diff --git a/browser/main/HomeContainer/Components/UserNavigator.js b/browser/main/HomeContainer/Components/UserNavigator.js index 481559d5..380c9400 100644 --- a/browser/main/HomeContainer/Components/UserNavigator.js +++ b/browser/main/HomeContainer/Components/UserNavigator.js @@ -7,7 +7,7 @@ export default class UserNavigator extends Component { renderUserList () { var users = this.props.users.map((user, index) => (
  • - +
    {user.name}
    {'⌘' + (index + 1)}
    @@ -26,6 +26,10 @@ export default class UserNavigator extends Component { return (
    {this.renderUserList()} +
    ) } diff --git a/browser/main/index.js b/browser/main/index.js index 0a70ecfc..a8c1e5a9 100644 --- a/browser/main/index.js +++ b/browser/main/index.js @@ -14,11 +14,11 @@ require('../styles/main/index.styl') function onlyUser (state, replaceState) { var currentUser = JSON.parse(localStorage.getItem('currentUser')) if (currentUser == null) replaceState('login', '/login') + if (state.location.pathname === '/') replaceState('user', '/users/' + currentUser.id) } let routes = ( - @@ -27,11 +27,11 @@ let routes = ( ) // with Dev -import { compose } from 'redux' -// Redux DevTools store enhancers -import { devTools, persistState } from 'redux-devtools' -// React components for Redux DevTools -import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react' +// import { compose } from 'redux' +// // Redux DevTools store enhancers +// import { devTools, persistState } from 'redux-devtools' +// // React components for Redux DevTools +// import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react' // let finalCreateStore = compose(devTools(), persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)))(createStore) // let store = finalCreateStore(reducer) diff --git a/browser/styles/main/HomeContainer/ArticleNavigator.styl b/browser/styles/main/HomeContainer/ArticleNavigator.styl new file mode 100644 index 00000000..b8d614c8 --- /dev/null +++ b/browser/styles/main/HomeContainer/ArticleNavigator.styl @@ -0,0 +1,7 @@ +articleNavBgColor = #353535 + +.ArticleNavigator + background-color articleNavBgColor + absolute top bottom + left 60px + width 200px diff --git a/browser/styles/main/HomeContainer/UserNavigator.styl b/browser/styles/main/HomeContainer/UserNavigator.styl index e053fd94..5d1b088e 100644 --- a/browser/styles/main/HomeContainer/UserNavigator.styl +++ b/browser/styles/main/HomeContainer/UserNavigator.styl @@ -27,59 +27,55 @@ userAnchorActiveBgColor = white font-size 1.1em cursor pointer transition 0.1s - opacity 0.8 img.ProfileImage width 38px height 38px border-radius 22px - &:hover, &.active - opacity 1 + opacity 0.7 + &:hover + img.ProfileImage + opacity 1 .userTooltip opacity 1 + &.active + img.ProfileImage + opacity 1 .userTooltip + tooltip() position absolute - z-index popupZIndex - background-color transparentify(invBackgroundColor, 80%) - color invTextColorq - padding 10px - line-height 1em - border-radius 5px margin-top -52px - margin-left 52px - white-space nowrap - opacity 0 - transition 0.1s - pointer-events none + margin-left 44px .keyLabel margin-top -25px font-size 0.8em color userNavigatorColor - button.newTeamButton + button.createTeamBtn display block margin 0 auto width 30px height 30px - circle() - border solid 1px lightButtonColor - color lightButtonColor + border-radius 15px + border 2px solid darken(white, 5%) + color darken(white, 5%) text-align center background-image none background-color transparent box-sizing border-box - absolute left bottom right + absolute left right bottom 15px - &:hover, &.hover, &:focus, &.focus - border-color darken(lightButtonColor, 50%) - color darken(lightButtonColor, 50%) - &:active, &.active - border-color darken(brandBorderColor, 10%) - background-color brandColor - color white + font-size 22px + line-height 22px + transition 0.1s .tooltip tooltip() - margin-top -22px - margin-left 33px - font-size 14px - &:hover .tooltip - opacity 1 + margin-top -26px + margin-left 30px + &:hover, &.hover, &:focus, &.focus + color white + border-color white + .tooltip + opacity 1 + &:active + background-color brandColor + border-color brandColor diff --git a/browser/styles/main/HomeContainer/index.styl b/browser/styles/main/HomeContainer/index.styl index ee2dc944..1575d1ec 100644 --- a/browser/styles/main/HomeContainer/index.styl +++ b/browser/styles/main/HomeContainer/index.styl @@ -1,4 +1,5 @@ @import './UserNavigator' @import './ArticleTopBar' +@import './ArticleNavigator' @import './ArticleList' @import './ArticleDetail' diff --git a/browser/styles/mixins/tooltip.styl b/browser/styles/mixins/tooltip.styl index 13baf992..963d52fc 100644 --- a/browser/styles/mixins/tooltip.styl +++ b/browser/styles/mixins/tooltip.styl @@ -3,10 +3,9 @@ tooltip() z-index popupZIndex background-color transparentify(invBackgroundColor, 80%) color invTextColor - padding 10px + padding 10px 15px font-size 12px line-height 12px - border-radius 5px white-space nowrap opacity 0 transition 0.1s