Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion browser/components/RealtimeNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RealtimeNotification extends React.Component {
: ''

return (
<div styleName='notification-area'>{link}</div>
<div styleName='notification-area' style={this.props.style}>{link}</div>
)
}
}
Expand Down
10 changes: 5 additions & 5 deletions browser/components/RealtimeNotification.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
font-size 12px
position absolute
bottom 0px
right 0px
background-color #EBEBEB
width 100vw
height 30px
line-height 30px
text-align center

.notification-link
display inline-block
line-height normal
text-decoration none
color #282A36
border 1px solid #6FA8E6
background-color alpha(#6FA8E6, 0.2)
padding 3px 9px
border-radius 2px
position absolute
bottom 4px
margin-left -10%
transition 0.2s
&:hover
color #1378BD
Expand All @@ -32,4 +32,4 @@ body[data-theme="dark"]
background-color alpha(#5CB85C, 0.2)
transition 0.2s
&:hover
color #5CB85C
color #5CB85C
18 changes: 16 additions & 2 deletions browser/main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function focused () {
}

class Main extends React.Component {

constructor (props) {
super(props)

Expand Down Expand Up @@ -189,6 +190,17 @@ class Main extends React.Component {
render () {
let { config } = this.props

// the width of the navigation bar when it is folded/collapsed
const foldedNavigationWidth = 44
let notificationBarOffsetLeft
if (this.state.fullScreen) {
notificationBarOffsetLeft = 0
} else if (config.isSideNavFolded) {
notificationBarOffsetLeft = foldedNavigationWidth
} else {
notificationBarOffsetLeft = this.state.navWidth
}

return (
<div
className='Main'
Expand Down Expand Up @@ -217,7 +229,7 @@ class Main extends React.Component {
<div styleName={config.isSideNavFolded ? 'body--expanded' : 'body'}
id='main-body'
ref='body'
style={{left: config.isSideNavFolded ? 44 : this.state.navWidth}}
style={{left: config.isSideNavFolded ? foldedNavigationWidth : this.state.navWidth}}
>
<TopBar style={{width: this.state.listWidth}}
{..._.pick(this.props, [
Expand Down Expand Up @@ -256,7 +268,9 @@ class Main extends React.Component {
ignorePreviewPointerEvents={this.state.isRightSliderFocused}
/>
</div>
<RealtimeNotification />
<RealtimeNotification
style={{left: notificationBarOffsetLeft}}
/>
</div>
)
}
Expand Down