mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
add animation
This commit is contained in:
@@ -34,7 +34,6 @@ othersMenu.append(new MenuItem({
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const OSX = global.process.platform === 'darwin'
|
|
||||||
const BRAND_COLOR = '#18AF90'
|
const BRAND_COLOR = '#18AF90'
|
||||||
|
|
||||||
const editDeleteTutorialElement = (
|
const editDeleteTutorialElement = (
|
||||||
@@ -312,14 +311,21 @@ export default class ArticleDetail extends React.Component {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='ArticleDetail-info-control'>
|
<div className='ArticleDetail-info-control'>
|
||||||
|
<div className={'ArticleDetail-info-control-save' + (!isUnsaved ? ' hide' : '')}>
|
||||||
|
<button
|
||||||
|
onClick={e => this.handleSaveButtonClick(e)}
|
||||||
|
className='ArticleDetail-info-control-save-button'
|
||||||
|
disabled={!isUnsaved}
|
||||||
|
>
|
||||||
|
<i className='fa fa-fw fa-save'/> Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ShareButton
|
<ShareButton
|
||||||
article={activeArticle}
|
article={activeArticle}
|
||||||
user={user}
|
user={user}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<button onClick={e => this.handleSaveButtonClick(e)}>
|
|
||||||
<i className='fa fa-fw fa-save'/><span className='tooltip'>Save ({OSX ? '⌘ + s' : '^ + s'})</span>
|
|
||||||
</button>
|
|
||||||
<button onClick={e => this.handleOthersButtonClick(e)}>
|
<button onClick={e => this.handleOthersButtonClick(e)}>
|
||||||
<i className='fa fa-fw fa-angle-down'/>
|
<i className='fa fa-fw fa-angle-down'/>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ export default class ArticleNavigator extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}).filter(modifiedArticle => modifiedArticle).sort((a, b) => a.updatedAt - b.updatedAt)
|
}).filter(modifiedArticle => modifiedArticle).sort((a, b) => a.updatedAt - b.updatedAt)
|
||||||
|
let hasModified = modifiedElements.length > 0
|
||||||
|
|
||||||
let folderElememts = folders.map((folder, index) => {
|
let folderElememts = folders.map((folder, index) => {
|
||||||
let isActive = findWhere(targetFolders, {key: folder.key})
|
let isActive = findWhere(targetFolders, {key: folder.key})
|
||||||
@@ -170,22 +171,17 @@ export default class ArticleNavigator extends React.Component {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='ArticleNavigator-unsaved'>
|
<div className={'ArticleNavigator-unsaved' + (hasModified ? '' : ' hide')}>
|
||||||
<div className='ArticleNavigator-unsaved-header'>Work in progress</div>
|
<div className='ArticleNavigator-unsaved-header'>Work in progress</div>
|
||||||
<div className='ArticleNavigator-unsaved-list'>
|
<div className='ArticleNavigator-unsaved-list'>
|
||||||
{modifiedElements.length > 0
|
{modifiedElements}
|
||||||
? modifiedElements
|
|
||||||
: (
|
|
||||||
<div className='ArticleNavigator-unsaved-list-empty'>Empty list</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div className='ArticleNavigator-unsaved-control'>
|
<div className='ArticleNavigator-unsaved-control'>
|
||||||
<button onClick={e => this.handleSaveAllClick()} className='ArticleNavigator-unsaved-control-save-all-button' disabled={modifiedElements.length === 0}>Save all</button>
|
<button onClick={e => this.handleSaveAllClick()} className='ArticleNavigator-unsaved-control-save-all-button' disabled={modifiedElements.length === 0}>Save all</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='ArticleNavigator-folders'>
|
<div className={'ArticleNavigator-folders' + (hasModified ? '' : ' expand')}>
|
||||||
<div className='ArticleNavigator-folders-header'>
|
<div className='ArticleNavigator-folders-header'>
|
||||||
<div className='title'>Folders</div>
|
<div className='title'>Folders</div>
|
||||||
<button onClick={e => this.handleNewFolderButton(e)} className='addBtn'>
|
<button onClick={e => this.handleNewFolderButton(e)} className='addBtn'>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ infoButton()
|
|||||||
cursor pointer
|
cursor pointer
|
||||||
height 33px
|
height 33px
|
||||||
width 33px
|
width 33px
|
||||||
|
line-height 33px
|
||||||
margin-right 5px
|
margin-right 5px
|
||||||
font-size 18px
|
font-size 18px
|
||||||
color inactiveTextColor
|
color inactiveTextColor
|
||||||
@@ -67,8 +68,10 @@ infoButton()
|
|||||||
color brandColor
|
color brandColor
|
||||||
.ArticleDetail-info-control
|
.ArticleDetail-info-control
|
||||||
float right
|
float right
|
||||||
|
clearfix
|
||||||
.ShareButton
|
.ShareButton
|
||||||
display inline-block
|
display block
|
||||||
|
float left
|
||||||
&>button, .ShareButton-open-button
|
&>button, .ShareButton-open-button
|
||||||
infoButton()
|
infoButton()
|
||||||
.tooltip
|
.tooltip
|
||||||
@@ -78,8 +81,35 @@ infoButton()
|
|||||||
.tooltip
|
.tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
&>button
|
&>button
|
||||||
&:nth-child(2) .tooltip
|
float left
|
||||||
|
&:nth-child(1) .tooltip
|
||||||
margin-left -65px
|
margin-left -65px
|
||||||
|
.ArticleDetail-info-control-save
|
||||||
|
float left
|
||||||
|
width 80px
|
||||||
|
margin-right 5px
|
||||||
|
overflow hidden
|
||||||
|
transition width 0.15s ease-in-out
|
||||||
|
border-radius 16.5px
|
||||||
|
&.hide
|
||||||
|
width 0px
|
||||||
|
opacity 0.2
|
||||||
|
.ArticleDetail-info-control-save-button
|
||||||
|
infoButton()
|
||||||
|
background-color brandColor
|
||||||
|
color white
|
||||||
|
font-size 12px
|
||||||
|
width 100%
|
||||||
|
border 1px solid brandBorderColor
|
||||||
|
white-space nowrap
|
||||||
|
.fa
|
||||||
|
font-size 18px
|
||||||
|
&:hover
|
||||||
|
color white
|
||||||
|
background-color lighten(brandColor, 15%)
|
||||||
|
&:focus
|
||||||
|
color white
|
||||||
|
background-color lighten(brandColor, 15%)
|
||||||
.ShareButton-open-button .tooltip
|
.ShareButton-open-button .tooltip
|
||||||
margin-left -40px
|
margin-left -40px
|
||||||
.ShareButton-dropdown
|
.ShareButton-dropdown
|
||||||
|
|||||||
@@ -61,12 +61,14 @@ articleCount = #999
|
|||||||
top 100px
|
top 100px
|
||||||
width 100%
|
width 100%
|
||||||
height 225px
|
height 225px
|
||||||
|
transition opacity 0.2s ease-in-out
|
||||||
|
&.hide
|
||||||
|
opacity 0.2
|
||||||
.ArticleNavigator-unsaved-header
|
.ArticleNavigator-unsaved-header
|
||||||
border-bottom 1px solid alpha(borderColor, 0.5)
|
border-bottom 1px solid alpha(borderColor, 0.5)
|
||||||
padding-bottom 5px
|
padding-bottom 5px
|
||||||
clearfix()
|
clearfix()
|
||||||
position relative
|
position relative
|
||||||
z-index 30
|
|
||||||
padding-left 10px
|
padding-left 10px
|
||||||
font-size 18px
|
font-size 18px
|
||||||
line-height 22px
|
line-height 22px
|
||||||
@@ -140,6 +142,10 @@ articleCount = #999
|
|||||||
absolute bottom
|
absolute bottom
|
||||||
top 365px
|
top 365px
|
||||||
width 100%
|
width 100%
|
||||||
|
transition top 0.15s ease-in-out
|
||||||
|
background-color articleNavBgColor
|
||||||
|
&.expand
|
||||||
|
top 100px
|
||||||
.ArticleNavigator-folders-header
|
.ArticleNavigator-folders-header
|
||||||
border-bottom 1px solid alpha(borderColor, 0.5)
|
border-bottom 1px solid alpha(borderColor, 0.5)
|
||||||
padding-bottom 5px
|
padding-bottom 5px
|
||||||
|
|||||||
Reference in New Issue
Block a user