diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-08-26 05:47:01 -0700 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-08-26 05:47:01 -0700 |
commit | d0d65631dfda6b43339e5c3dd1f1c336040d6672 (patch) | |
tree | 1b5f9b0afefb2e764f630042607753ea6d6941e8 /ui-react/src/LoopUI.js | |
parent | 3f5a8564f29f0284377688f9d3c288baf475d57a (diff) |
Fix the CSS
Remove colors settings in global css and add the theme property to the
menubar correctly (not via global prop anymore)
Issue-ID: CLAMP-477
Change-Id: Ie0ba1ea350e393d452108b1dadb10e7dbe1dab23
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/LoopUI.js')
-rw-r--r-- | ui-react/src/LoopUI.js | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js index b64cfbaa..9389ad65 100644 --- a/ui-react/src/LoopUI.js +++ b/ui-react/src/LoopUI.js @@ -45,12 +45,29 @@ import PerformAction from './components/dialogs/PerformActions'; import RefreshStatus from './components/dialogs/RefreshStatus'; import DeployLoop from './components/dialogs/DeployLoop'; +import { Link } from 'react-router-dom'; + +const StyledMainDiv = styled.div` + background-color: ${props => props.theme.backgroundColor}; +` + const ProjectNameStyled = styled.a` vertical-align: middle; padding-left: 30px; - font-size: 30px; + font-size: 36px; + font-weight: bold; +` +const StyledRouterLink = styled(Link)` + color: ${props => props.theme.menuFontColor}; + background-color: ${props => props.theme.backgroundColor}; ` + +const StyledLoginInfo = styled.a` + color: ${props => props.theme.menuFontColor}; + background-color: ${props => props.theme.backgroundColor}; +` + const LoopViewDivStyled = styled.div` height: 100%; overflow: hidden; @@ -113,7 +130,9 @@ export default class LoopUI extends React.Component { renderUserLoggedNavBar() { return ( <Navbar.Text> - Signed in as: <a href="/login">{this.state.userName}</a> + <StyledLoginInfo>Signed in as: </StyledLoginInfo> + <StyledRouterLink to="/userInfo">{this.state.userName}</StyledRouterLink> + <StyledRouterLink to="/logout/"> (logout)</StyledRouterLink> </Navbar.Text> ); } @@ -129,8 +148,9 @@ export default class LoopUI extends React.Component { renderNavBar() { return ( - <Navbar expand="lg"> + <Navbar > {this.renderLogoNavBar()} + <Navbar.Toggle aria-controls="responsive-navbar-nav" /> {this.renderMenuNavBar()} {this.renderUserLoggedNavBar()} </Navbar> @@ -188,7 +208,7 @@ export default class LoopUI extends React.Component { render() { return ( - <div id="main_div"> + <StyledMainDiv id="main_div"> <Route path="/operationalPolicyModal" render={(routeProps) => (<OperationalPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> <Route path="/configurationPolicyModal/:componentName" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> @@ -206,7 +226,7 @@ export default class LoopUI extends React.Component { <GlobalClampStyle /> {this.renderNavBar()} {this.renderLoopViewer()} - </div> + </StyledMainDiv> ); } } |