Properly added name config

Now access it through getConfigs
Documented it in README
This commit is contained in:
Jesse Mandel
2017-06-26 22:49:57 -07:00
parent b942d08923
commit 41e4d98a4c
3 changed files with 6 additions and 5 deletions

View File

@@ -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" ]

View File

@@ -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) => {