couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From millayr <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request #883: Navbar refactor
Date Tue, 28 Mar 2017 18:26:09 GMT
Github user millayr commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/883#discussion_r108499614
  
    --- Diff: app/addons/fauxton/navigation/container/NavBar.js ---
    @@ -0,0 +1,77 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +import FauxtonAPI from "../../../../core/api";
    +import React from "react";
    +
    +import ReactDOM from "react-dom";
    +import Stores from "../stores";
    +
    +import NavBar from '../components/NavBar';
    +
    +const navBarStore = Stores.navBarStore;
    +
    +const NavBarContainer = React.createClass({
    +
    +  getStoreState () {
    +    return {
    +      navLinks: navBarStore.getNavLinks(),
    +      bottomNavLinks: navBarStore.getBottomNavLinks(),
    +      footerNavLinks: navBarStore.getFooterNavLinks(),
    +      activeLink: navBarStore.getActiveLink(),
    +      version: navBarStore.getVersion(),
    +      isMinimized: navBarStore.isMinimized(),
    +      isNavBarVisible: navBarStore.isNavBarVisible(),
    +
    +      isLoginSectionVisible: navBarStore.getIsLoginSectionVisible(),
    +      isLoginVisibleInsteadOfLogout: navBarStore.getIsLoginVisibleInsteadOfLogout()
    +    };
    +  },
    +
    +  getInitialState () {
    +    return this.getStoreState();
    +  },
    +
    +  onChange () {
    +    this.setState(this.getStoreState());
    +  },
    +
    +  setMenuState () {
    +    FauxtonAPI.Events.trigger(FauxtonAPI.constants.EVENTS.NAVBAR_SIZE_CHANGED, this.state.isMinimized);
    --- End diff --
    
    removed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message