1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Move the notification area from main window to preference modal

This commit is contained in:
Kazu Yokomizo
2017-11-05 17:56:32 +09:00
parent 1f8acc3afc
commit 92eccb635a
9 changed files with 14 additions and 32 deletions

View File

@@ -40,7 +40,7 @@ class RealtimeNotification extends React.Component {
? <a styleName='notification-link' href={notifications[0].linkUrl} ? <a styleName='notification-link' href={notifications[0].linkUrl}
onClick={(e) => this.handleLinkClick(e)} onClick={(e) => this.handleLinkClick(e)}
> >
{notifications[0].text} Info: {notifications[0].text}
</a> </a>
: '' : ''

View File

@@ -2,20 +2,20 @@
z-index 1000 z-index 1000
font-size 12px font-size 12px
position absolute position absolute
bottom 0px bottom 20px
right 0px width 100%
background-color #EBEBEB float left
height 30px height 30px
background-color none
.notification-link .notification-link
position absolute position absolute
right 5px
top 5px
text-decoration none text-decoration none
color #282A36 color #282A36
font-size 14px
border 1px solid #6FA8E6 border 1px solid #6FA8E6
background-color alpha(#6FA8E6, 0.2) background-color alpha(#6FA8E6, 0.2)
padding 3px 9px padding 5px 12px
border-radius 2px border-radius 2px
transition 0.2s transition 0.2s
&:hover &:hover
@@ -23,7 +23,7 @@
body[data-theme="dark"] body[data-theme="dark"]
.notification-area .notification-area
background-color #1E2124 background-color none
.notification-link .notification-link
color #fff color #fff

View File

@@ -3,9 +3,7 @@
.root .root
absolute top right bottom absolute top right bottom
border-width 0 0 1px border-width 0
border-style solid
border-color $ui-borderColor
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow box-shadow $note-detail-box-shadow
@@ -44,7 +42,6 @@
body[data-theme="dark"] body[data-theme="dark"]
.root .root
border-color $ui-dark-borderColor
background-color $ui-dark-noteDetail-backgroundColor background-color $ui-dark-noteDetail-backgroundColor
box-shadow none box-shadow none

View File

@@ -3,9 +3,7 @@
.root .root
absolute top bottom right absolute top bottom right
border-width 0 0 1px border-width 0
border-style solid
border-color $ui-borderColor
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow box-shadow $note-detail-box-shadow
@@ -57,7 +55,7 @@
.override .override
absolute bottom left absolute bottom left
bottom 30px bottom 2px
left 60px left 60px
height 23px height 23px
z-index 101 z-index 101

View File

@@ -14,7 +14,6 @@ import InitModal from 'browser/main/modals/InitModal'
import mixpanel from 'browser/main/lib/mixpanel' import mixpanel from 'browser/main/lib/mixpanel'
import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig' import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig'
import eventEmitter from 'browser/main/lib/eventEmitter' import eventEmitter from 'browser/main/lib/eventEmitter'
import RealtimeNotification from 'browser/components/RealtimeNotification'
function focused () { function focused () {
mixpanel.track('MAIN_FOCUSED') mixpanel.track('MAIN_FOCUSED')
@@ -192,14 +191,6 @@ class Main extends React.Component {
// the width of the navigation bar when it is folded/collapsed // the width of the navigation bar when it is folded/collapsed
const foldedNavigationWidth = 44 const foldedNavigationWidth = 44
let notificationBarOffsetLeft
if (this.state.fullScreen) {
notificationBarOffsetLeft = 0
} else if (config.isSideNavFolded) {
notificationBarOffsetLeft = foldedNavigationWidth
} else {
notificationBarOffsetLeft = this.state.navWidth
}
return ( return (
<div <div
@@ -268,9 +259,6 @@ class Main extends React.Component {
ignorePreviewPointerEvents={this.state.isRightSliderFocused} ignorePreviewPointerEvents={this.state.isRightSliderFocused}
/> />
</div> </div>
<RealtimeNotification
style={{left: notificationBarOffsetLeft}}
/>
</div> </div>
) )
} }

View File

@@ -2,7 +2,6 @@ $control-height = 30px
.root .root
absolute left bottom absolute left bottom
bottom 30px
top $topBar-height - 1 top $topBar-height - 1
background-color $ui-noteList-backgroundColor background-color $ui-noteList-backgroundColor

View File

@@ -2,8 +2,6 @@
.root .root
absolute bottom left right absolute bottom left right
height $statusBar-height
bottom 16px
z-index 100 z-index 100
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
display flex display flex

View File

@@ -9,6 +9,7 @@ import StoragesTab from './StoragesTab'
import ModalEscButton from 'browser/components/ModalEscButton' import ModalEscButton from 'browser/components/ModalEscButton'
import CSSModules from 'browser/lib/CSSModules' import CSSModules from 'browser/lib/CSSModules'
import styles from './PreferencesModal.styl' import styles from './PreferencesModal.styl'
import RealtimeNotification from 'browser/components/RealtimeNotification'
class Preferences extends React.Component { class Preferences extends React.Component {
constructor (props) { constructor (props) {
@@ -136,6 +137,7 @@ class Preferences extends React.Component {
<div ref='content' styleName='content'> <div ref='content' styleName='content'>
{content} {content}
</div> </div>
<RealtimeNotification/>
</div> </div>
) )
} }

View File

@@ -5,7 +5,7 @@ $danger-color = #c9302c
$danger-lighten-color = lighten(#c9302c, 5%) $danger-lighten-color = lighten(#c9302c, 5%)
// Layouts // Layouts
$statusBar-height = 36px $statusBar-height = 0px
$sideNav-width = 200px $sideNav-width = 200px
$sideNav--folded-width = 44px $sideNav--folded-width = 44px
$topBar-height = 60px $topBar-height = 60px