Properly added name config
Now access it through getConfigs Documented it in README
This commit is contained in:
@@ -6,7 +6,7 @@ import ApisPreset from "core/presets/apis"
|
||||
import * as AllPlugins from "core/plugins/all"
|
||||
import { parseSeach, filterConfigs } from "core/utils"
|
||||
|
||||
const CONFIGS = [ "url", "urls", "spec", "validatorUrl", "onComplete", "onFailure", "authorizations", "docExpansion",
|
||||
const CONFIGS = [ "url", "urls", "name", "spec", "validatorUrl", "onComplete", "onFailure", "authorizations", "docExpansion",
|
||||
"apisSorter", "operationsSorter", "supportedSubmitMethods", "dom_id", "defaultModelRendering", "oauth2RedirectUrl",
|
||||
"showRequestHeaders", "custom", "modelPropertyMacro", "parameterMacro", "displayOperationId" ]
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import React, { PropTypes } from "react"
|
||||
|
||||
//import "./topbar.less"
|
||||
import Logo from "./logo_small.png"
|
||||
import { parseSeach } from "core/utils"
|
||||
|
||||
export default class Topbar extends React.Component {
|
||||
|
||||
@@ -37,10 +36,11 @@ export default class Topbar extends React.Component {
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const urls = this.props.getConfigs().urls || []
|
||||
const configs = this.props.getConfigs()
|
||||
const urls = configs.urls || []
|
||||
|
||||
if(urls && urls.length) {
|
||||
let selectedName = parseSeach().name
|
||||
let selectedName = configs.name
|
||||
if(selectedName)
|
||||
{
|
||||
urls.forEach((spec, i) => {
|
||||
|
||||
Reference in New Issue
Block a user