mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b384b1d15 | ||
|
|
a1d61edb9c | ||
|
|
96a8687896 | ||
|
|
0448773682 | ||
|
|
57998ba727 | ||
|
|
de83447cb3 | ||
|
|
eba19468d5 | ||
|
|
65c78df671 | ||
|
|
a7096aa89f | ||
|
|
15a50ef452 | ||
|
|
04036e5c87 | ||
|
|
2bbb5ef74e | ||
|
|
91eb7feb3c | ||
|
|
978d77142c | ||
|
|
e9cfb2c4ee | ||
|
|
190b6edfb1 |
@@ -25,6 +25,4 @@ finderWindow.on('blur', function () {
|
|||||||
finderWindow.hide()
|
finderWindow.hide()
|
||||||
})
|
})
|
||||||
|
|
||||||
finderWindow.setVisibleOnAllWorkspaces(true)
|
|
||||||
|
|
||||||
module.exports = finderWindow
|
module.exports = finderWindow
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ const url = path.resolve(__dirname, '../browser/main/index.html')
|
|||||||
|
|
||||||
mainWindow.loadURL('file://' + url)
|
mainWindow.loadURL('file://' + url)
|
||||||
|
|
||||||
mainWindow.setVisibleOnAllWorkspaces(true)
|
|
||||||
|
|
||||||
mainWindow.webContents.on('new-window', function (e) {
|
mainWindow.webContents.on('new-window', function (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { PropTypes} from 'react'
|
import React, { PropTypes} from 'react'
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { CREATE_MODE, EDIT_MODE, IDLE_MODE, NEW, toggleTutorial } from 'boost/actions'
|
import { EDIT_MODE, IDLE_MODE, NEW, toggleTutorial } from 'boost/actions'
|
||||||
// import UserNavigator from './HomePage/UserNavigator'
|
// import UserNavigator from './HomePage/UserNavigator'
|
||||||
import ArticleNavigator from './HomePage/ArticleNavigator'
|
import ArticleNavigator from './HomePage/ArticleNavigator'
|
||||||
import ArticleTopBar from './HomePage/ArticleTopBar'
|
import ArticleTopBar from './HomePage/ArticleTopBar'
|
||||||
@@ -57,7 +57,7 @@ class HomePage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (status.mode) {
|
switch (status.mode) {
|
||||||
case CREATE_MODE:
|
|
||||||
case EDIT_MODE:
|
case EDIT_MODE:
|
||||||
if (e.keyCode === 27) {
|
if (e.keyCode === 27) {
|
||||||
detail.handleCancelButtonClick()
|
detail.handleCancelButtonClick()
|
||||||
@@ -65,6 +65,13 @@ class HomePage extends React.Component {
|
|||||||
if ((e.keyCode === 13 && e.metaKey) || (e.keyCode === 83 && e.metaKey)) {
|
if ((e.keyCode === 13 && e.metaKey) || (e.keyCode === 83 && e.metaKey)) {
|
||||||
detail.handleSaveButtonClick()
|
detail.handleSaveButtonClick()
|
||||||
}
|
}
|
||||||
|
if (e.keyCode === 80 && e.metaKey) {
|
||||||
|
detail.handleTogglePreviewButtonClick()
|
||||||
|
}
|
||||||
|
if (e.keyCode === 78 && e.metaKey) {
|
||||||
|
nav.handleNewPostButtonClick()
|
||||||
|
e.preventDefault()
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case IDLE_MODE:
|
case IDLE_MODE:
|
||||||
if (e.keyCode === 69) {
|
if (e.keyCode === 69) {
|
||||||
@@ -99,7 +106,7 @@ class HomePage extends React.Component {
|
|||||||
list.selectNextArticle()
|
list.selectNextArticle()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.keyCode === 65 || e.keyCode === 13 && e.metaKey) {
|
if (e.keyCode === 65 || (e.keyCode === 13 && e.metaKey) || (e.keyCode === 78 && e.metaKey)) {
|
||||||
nav.handleNewPostButtonClick()
|
nav.handleNewPostButtonClick()
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
@@ -257,7 +264,8 @@ HomePage.propTypes = {
|
|||||||
folder: PropTypes.array,
|
folder: PropTypes.array,
|
||||||
tag: PropTypes.array,
|
tag: PropTypes.array,
|
||||||
text: PropTypes.array
|
text: PropTypes.array
|
||||||
})
|
}),
|
||||||
|
tags: PropTypes.array
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(remap)(HomePage)
|
export default connect(remap)(HomePage)
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ import TagSelect from 'boost/components/TagSelect'
|
|||||||
import ModeSelect from 'boost/components/ModeSelect'
|
import ModeSelect from 'boost/components/ModeSelect'
|
||||||
import activityRecord from 'boost/activityRecord'
|
import activityRecord from 'boost/activityRecord'
|
||||||
|
|
||||||
|
const electron = require('electron')
|
||||||
|
const clipboard = electron.clipboard
|
||||||
|
|
||||||
const BRAND_COLOR = '#18AF90'
|
const BRAND_COLOR = '#18AF90'
|
||||||
|
|
||||||
const editDeleteTutorialElement = (
|
const editDeleteTutorialElement = (
|
||||||
@@ -84,6 +87,10 @@ const modeSelectTutorialElement = (
|
|||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
function notify (...args) {
|
||||||
|
return new window.Notification(...args)
|
||||||
|
}
|
||||||
|
|
||||||
function makeInstantArticle (article) {
|
function makeInstantArticle (article) {
|
||||||
return Object.assign({}, article)
|
return Object.assign({}, article)
|
||||||
}
|
}
|
||||||
@@ -154,6 +161,13 @@ export default class ArticleDetail extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleClipboardButtonClick (e) {
|
||||||
|
clipboard.writeText(this.props.activeArticle.content)
|
||||||
|
notify('Saved to Clipboard!', {
|
||||||
|
body: 'Paste it wherever you want!'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
handleEditButtonClick (e) {
|
handleEditButtonClick (e) {
|
||||||
let { dispatch } = this.props
|
let { dispatch } = this.props
|
||||||
dispatch(switchMode(EDIT_MODE))
|
dispatch(switchMode(EDIT_MODE))
|
||||||
@@ -185,8 +199,13 @@ export default class ArticleDetail extends React.Component {
|
|||||||
: (
|
: (
|
||||||
<span className='noTags'>Not tagged yet</span>
|
<span className='noTags'>Not tagged yet</span>
|
||||||
) : null
|
) : null
|
||||||
|
|
||||||
let folder = _.findWhere(folders, {key: activeArticle.FolderKey})
|
let folder = _.findWhere(folders, {key: activeArticle.FolderKey})
|
||||||
|
|
||||||
|
let title = activeArticle.title.trim().length === 0
|
||||||
|
? <small>(Untitled)</small>
|
||||||
|
: activeArticle.title
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='ArticleDetail idle'>
|
<div className='ArticleDetail idle'>
|
||||||
{this.state.openDeleteConfirmMenu
|
{this.state.openDeleteConfirmMenu
|
||||||
@@ -214,6 +233,9 @@ export default class ArticleDetail extends React.Component {
|
|||||||
<div className='tags'><i className='fa fa-fw fa-tags'/>{tags}</div>
|
<div className='tags'><i className='fa fa-fw fa-tags'/>{tags}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
|
<button onClick={e => this.handleClipboardButtonClick(e)} className='editBtn'>
|
||||||
|
<i className='fa fa-fw fa-clipboard'/><span className='tooltip'>Copy to clipboard</span>
|
||||||
|
</button>
|
||||||
<button onClick={e => this.handleEditButtonClick(e)} className='editBtn'>
|
<button onClick={e => this.handleEditButtonClick(e)} className='editBtn'>
|
||||||
<i className='fa fa-fw fa-edit'/><span className='tooltip'>Edit (e)</span>
|
<i className='fa fa-fw fa-edit'/><span className='tooltip'>Edit (e)</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -232,7 +254,7 @@ export default class ArticleDetail extends React.Component {
|
|||||||
<div className='detailPanel'>
|
<div className='detailPanel'>
|
||||||
<div className='header'>
|
<div className='header'>
|
||||||
<ModeIcon className='mode' mode={activeArticle.mode}/>
|
<ModeIcon className='mode' mode={activeArticle.mode}/>
|
||||||
<div className='title'>{activeArticle.title}</div>
|
<div className='title'>{title}</div>
|
||||||
</div>
|
</div>
|
||||||
{activeArticle.mode === 'markdown'
|
{activeArticle.mode === 'markdown'
|
||||||
? <MarkdownPreview content={activeArticle.content}/>
|
? <MarkdownPreview content={activeArticle.content}/>
|
||||||
@@ -265,8 +287,12 @@ export default class ArticleDetail extends React.Component {
|
|||||||
|
|
||||||
delete newArticle.status
|
delete newArticle.status
|
||||||
newArticle.updatedAt = new Date()
|
newArticle.updatedAt = new Date()
|
||||||
|
newArticle.title = newArticle.title.trim()
|
||||||
if (newArticle.createdAt == null) {
|
if (newArticle.createdAt == null) {
|
||||||
newArticle.createdAt = new Date()
|
newArticle.createdAt = new Date()
|
||||||
|
if (newArticle.title.length === 0) {
|
||||||
|
newArticle.title = `Created at ${moment(newArticle.createdAt).format('YYYY/MM/DD HH:mm')}`
|
||||||
|
}
|
||||||
activityRecord.emit('ARTICLE_CREATE')
|
activityRecord.emit('ARTICLE_CREATE')
|
||||||
} else {
|
} else {
|
||||||
activityRecord.emit('ARTICLE_UPDATE')
|
activityRecord.emit('ARTICLE_UPDATE')
|
||||||
@@ -408,7 +434,9 @@ export default class ArticleDetail extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTogglePreviewButtonClick (e) {
|
handleTogglePreviewButtonClick (e) {
|
||||||
this.setState({previewMode: !this.state.previewMode})
|
if (this.state.article.mode === 'markdown') {
|
||||||
|
this.setState({previewMode: !this.state.previewMode})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTitleKeyDown (e) {
|
handleTitleKeyDown (e) {
|
||||||
@@ -453,18 +481,36 @@ export default class ArticleDetail extends React.Component {
|
|||||||
<div className='right'>
|
<div className='right'>
|
||||||
{
|
{
|
||||||
this.state.article.mode === 'markdown'
|
this.state.article.mode === 'markdown'
|
||||||
? (<button className='preview' onClick={e => this.handleTogglePreviewButtonClick(e)}>{!this.state.previewMode ? 'Preview' : 'Edit'}</button>)
|
? (<button className='preview' onClick={e => this.handleTogglePreviewButtonClick(e)}>
|
||||||
|
{
|
||||||
|
!this.state.previewMode
|
||||||
|
? 'Preview'
|
||||||
|
: 'Edit'
|
||||||
|
}
|
||||||
|
</button>)
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
<button onClick={e => this.handleCancelButtonClick(e)}>Cancel</button>
|
<button onClick={e => this.handleCancelButtonClick(e)}>
|
||||||
<button onClick={e => this.handleSaveButtonClick(e)} className='primary'>Save</button>
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button onClick={e => this.handleSaveButtonClick(e)} className='primary'>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='detailBody'>
|
<div className='detailBody'>
|
||||||
<div className='detailPanel'>
|
<div className='detailPanel'>
|
||||||
<div className='header'>
|
<div className='header'>
|
||||||
<div className='title'>
|
<div className='title'>
|
||||||
<input onKeyDown={e => this.handleTitleKeyDown(e)} placeholder='Title' ref='title' value={this.state.article.title} onChange={e => this.handleTitleChange(e)}/>
|
<input
|
||||||
|
onKeyDown={e => this.handleTitleKeyDown(e)}
|
||||||
|
placeholder={this.state.article.createdAt == null
|
||||||
|
? `Created at ${moment().format('YYYY/MM/DD HH:mm')}`
|
||||||
|
: 'Title'}
|
||||||
|
ref='title'
|
||||||
|
value={this.state.article.title}
|
||||||
|
onChange={e => this.handleTitleChange(e)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ModeSelect
|
<ModeSelect
|
||||||
ref='mode'
|
ref='mode'
|
||||||
|
|||||||
@@ -80,6 +80,12 @@ export default class ArticleList extends React.Component {
|
|||||||
: (<span>Not tagged yet</span>)
|
: (<span>Not tagged yet</span>)
|
||||||
let folder = _.findWhere(folders, {key: article.FolderKey})
|
let folder = _.findWhere(folders, {key: article.FolderKey})
|
||||||
|
|
||||||
|
let title = article.status !== NEW
|
||||||
|
? article.title.trim().length === 0
|
||||||
|
? <small>(Untitled)</small>
|
||||||
|
: article.title
|
||||||
|
: '(New article)'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={'article-' + article.key}>
|
<div key={'article-' + article.key}>
|
||||||
<div onClick={e => this.handleArticleClick(article)(e)} className={'articleItem' + (activeArticle.key === article.key ? ' active' : '')}>
|
<div onClick={e => this.handleArticleClick(article)(e)} className={'articleItem' + (activeArticle.key === article.key ? ' active' : '')}>
|
||||||
@@ -91,7 +97,7 @@ export default class ArticleList extends React.Component {
|
|||||||
<span className='updatedAt'>{article.status != null ? article.status : moment(article.updatedAt).fromNow()}</span>
|
<span className='updatedAt'>{article.status != null ? article.status : moment(article.updatedAt).fromNow()}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='middle'>
|
<div className='middle'>
|
||||||
<ModeIcon className='mode' mode={article.mode}/> <div className='title'>{article.status !== NEW ? article.title : '(New article)'}</div>
|
<ModeIcon className='mode' mode={article.mode}/> <div className='title'>{title}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='bottom'>
|
<div className='bottom'>
|
||||||
<div className='tags'><i className='fa fa-fw fa-tags'/>{tagElements}</div>
|
<div className='tags'><i className='fa fa-fw fa-tags'/>{tagElements}</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { PropTypes } from 'react'
|
import React, { PropTypes } from 'react'
|
||||||
import { findWhere } from 'lodash'
|
import { findWhere } from 'lodash'
|
||||||
import { setSearchFilter, switchFolder, switchMode, switchArticle, updateArticle, EDIT_MODE } from 'boost/actions'
|
import { setSearchFilter, switchFolder, switchMode, switchArticle, updateArticle, clearNewArticle, EDIT_MODE } from 'boost/actions'
|
||||||
import { openModal } from 'boost/modal'
|
import { openModal } from 'boost/modal'
|
||||||
import FolderMark from 'boost/components/FolderMark'
|
import FolderMark from 'boost/components/FolderMark'
|
||||||
import Preferences from 'boost/components/modal/Preferences'
|
import Preferences from 'boost/components/modal/Preferences'
|
||||||
@@ -85,6 +85,7 @@ export default class ArticleNavigator extends React.Component {
|
|||||||
status: 'NEW'
|
status: 'NEW'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch(clearNewArticle())
|
||||||
dispatch(updateArticle(newArticle))
|
dispatch(updateArticle(newArticle))
|
||||||
dispatch(switchArticle(newArticle.key, true))
|
dispatch(switchArticle(newArticle.key, true))
|
||||||
dispatch(switchMode(EDIT_MODE))
|
dispatch(switchMode(EDIT_MODE))
|
||||||
|
|||||||
@@ -35,18 +35,33 @@ export default class ArticleTopBar extends React.Component {
|
|||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
isTooltipHidden: true
|
isTooltipHidden: true,
|
||||||
|
isLinksDropdownOpen: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
this.searchInput = ReactDOM.findDOMNode(this.refs.searchInput)
|
this.searchInput = ReactDOM.findDOMNode(this.refs.searchInput)
|
||||||
|
this.linksButton = ReactDOM.findDOMNode(this.refs.links)
|
||||||
|
this.showLinksDropdown = e => {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
if (!this.state.isLinksDropdownOpen) {
|
||||||
|
this.setState({isLinksDropdownOpen: true})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.linksButton.addEventListener('click', this.showLinksDropdown)
|
||||||
|
this.hideLinksDropdown = e => {
|
||||||
|
if (this.state.isLinksDropdownOpen) {
|
||||||
|
this.setState({isLinksDropdownOpen: false})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener('click', this.hideLinksDropdown)
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
this.searchInput.removeEventListener('keydown', this.showTooltip)
|
document.removeEventListener('click', this.hideLinksDropdown)
|
||||||
this.searchInput.removeEventListener('focus', this.showTooltip)
|
this.linksButton.removeEventListener('click', this.showLinksDropdown())
|
||||||
this.searchInput.removeEventListener('blur', this.showTooltip)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTooltipRequest (e) {
|
handleTooltipRequest (e) {
|
||||||
@@ -118,8 +133,11 @@ export default class ArticleTopBar extends React.Component {
|
|||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
<div className={'tooltip' + (this.state.isTooltipHidden ? ' hide' : '')}>
|
<div className={'tooltip' + (this.state.isTooltipHidden ? ' hide' : '')}>
|
||||||
- Search by tag : #{'{string}'}<br/>
|
<ul>
|
||||||
- Search by folder : /{'{folder_name}'}
|
<li>- Search by tag : #{'{string}'}</li>
|
||||||
|
<li>- Search by folder : /{'{folder_name}'}</li>
|
||||||
|
<li><small>exact match : //{'{folder_name}'}</small></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -129,10 +147,23 @@ export default class ArticleTopBar extends React.Component {
|
|||||||
<div className='right'>
|
<div className='right'>
|
||||||
<button onClick={e => this.handleTutorialButtonClick(e)}>?<span className='tooltip'>How to use</span>
|
<button onClick={e => this.handleTutorialButtonClick(e)}>?<span className='tooltip'>How to use</span>
|
||||||
</button>
|
</button>
|
||||||
<ExternalLink className='logo' href='http://b00st.io'>
|
<a ref='links' className='linksBtn' href>
|
||||||
<img src='../../resources/favicon-230x230.png' width='44' height='44'/>
|
<img src='../../resources/favicon-230x230.png' width='44' height='44'/>
|
||||||
<span className='tooltip'>Boost official page</span>
|
</a>
|
||||||
</ExternalLink>
|
{
|
||||||
|
this.state.isLinksDropdownOpen
|
||||||
|
? (
|
||||||
|
<div className='links-dropdown'>
|
||||||
|
<ExternalLink className='links-item' href='https://b00st.io'>
|
||||||
|
<i className='fa fa-fw fa-home'/>Boost official page
|
||||||
|
</ExternalLink>
|
||||||
|
<ExternalLink className='links-item' href='https://github.com/BoostIO/boost-app-discussions/issues'>
|
||||||
|
<i className='fa fa-fw fa-bullhorn'/> Discuss
|
||||||
|
</ExternalLink>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
: null
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{status.isTutorialOpen ? (
|
{status.isTutorialOpen ? (
|
||||||
|
|||||||
@@ -323,7 +323,8 @@ iptFocusBorderColor = #369DCD
|
|||||||
right 15px
|
right 15px
|
||||||
font-size 24px
|
font-size 24px
|
||||||
line-height 60px
|
line-height 60px
|
||||||
|
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow-x auto
|
overflow-x auto
|
||||||
overflow-y hidden
|
overflow-y hidden
|
||||||
|
small
|
||||||
|
color #AAA
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ articleItemColor = #777
|
|||||||
left 19px
|
left 19px
|
||||||
right 0
|
right 0
|
||||||
overflow ellipsis
|
overflow ellipsis
|
||||||
|
small
|
||||||
|
color #AAA
|
||||||
.bottom
|
.bottom
|
||||||
padding 5px 0
|
padding 5px 0
|
||||||
overflow-x auto
|
overflow-x auto
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ articleCount = #999
|
|||||||
.userProfileName
|
.userProfileName
|
||||||
color brandColor
|
color brandColor
|
||||||
font-size 28px
|
font-size 28px
|
||||||
padding 6px 0 0 10px
|
padding 6px 37px 0 10px
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ infoBtnActiveBgColor = #3A3A3A
|
|||||||
opacity 1
|
opacity 1
|
||||||
&.hide
|
&.hide
|
||||||
opacity 0
|
opacity 0
|
||||||
|
ul
|
||||||
|
li:last-child
|
||||||
|
line-height 10px
|
||||||
|
margin-bottom 3px
|
||||||
|
small
|
||||||
|
font-size 10px
|
||||||
|
margin-left 15px
|
||||||
input
|
input
|
||||||
absolute top left
|
absolute top left
|
||||||
width 350px
|
width 350px
|
||||||
@@ -140,17 +147,33 @@ infoBtnActiveBgColor = #3A3A3A
|
|||||||
.tooltip
|
.tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
&>.logo
|
&>.linksBtn
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
top 8px
|
top 8px
|
||||||
right 15px
|
right 15px
|
||||||
opacity 0.7
|
opacity 0.7
|
||||||
.tooltip
|
|
||||||
tooltip()
|
|
||||||
margin-top 44px
|
|
||||||
margin-left -120px
|
|
||||||
&:hover
|
&:hover
|
||||||
opacity 1
|
opacity 1
|
||||||
.tooltip
|
.tooltip
|
||||||
opacity 1
|
opacity 1
|
||||||
|
&>.links-dropdown
|
||||||
|
position fixed
|
||||||
|
z-index 50
|
||||||
|
right 10px
|
||||||
|
top 40px
|
||||||
|
background-color transparentify(invBackgroundColor, 80%)
|
||||||
|
padding 5px 0
|
||||||
|
.links-item
|
||||||
|
padding 0 10px
|
||||||
|
height 33px
|
||||||
|
width 100%
|
||||||
|
display block
|
||||||
|
line-height 33px
|
||||||
|
text-decoration none
|
||||||
|
color white
|
||||||
|
&:hover
|
||||||
|
background-color transparentify(lighten(invBackgroundColor, 30%), 80%)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ app.on('ready', function () {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
trayMenu.append(new MenuItem({
|
trayMenu.append(new MenuItem({
|
||||||
label: 'Open Finder',
|
label: 'Open Finder window',
|
||||||
click: function () {
|
click: function () {
|
||||||
finderWindow.show()
|
finderWindow.show()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from 'react'
|
import React, { PropTypes } from 'react'
|
||||||
|
import ReactDOM from 'react-dom'
|
||||||
import linkState from 'boost/linkState'
|
import linkState from 'boost/linkState'
|
||||||
import { createFolder } from 'boost/actions'
|
import { createFolder } from 'boost/actions'
|
||||||
import store from 'boost/store'
|
import store from 'boost/store'
|
||||||
@@ -15,6 +16,10 @@ export default class CreateNewFolder extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount () {
|
||||||
|
ReactDOM.findDOMNode(this.refs.folderName).focus()
|
||||||
|
}
|
||||||
|
|
||||||
handleCloseButton (e) {
|
handleCloseButton (e) {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
@@ -84,7 +89,7 @@ export default class CreateNewFolder extends React.Component {
|
|||||||
|
|
||||||
<div className='title'>Create new folder</div>
|
<div className='title'>Create new folder</div>
|
||||||
|
|
||||||
<input onKeyDown={e => this.handleKeyDown(e)} className='ipt' type='text' valueLink={this.linkState('name')} placeholder='Enter folder name'/>
|
<input ref='folderName' onKeyDown={e => this.handleKeyDown(e)} className='ipt' type='text' valueLink={this.linkState('name')} placeholder='Enter folder name'/>
|
||||||
<div className='colorSelect'>
|
<div className='colorSelect'>
|
||||||
{colorElements}
|
{colorElements}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
import React, { PropTypes } from 'react'
|
import React, { PropTypes } from 'react'
|
||||||
|
import ReactDOM from 'react-dom'
|
||||||
import store from 'boost/store'
|
import store from 'boost/store'
|
||||||
import { unlockStatus, clearNewArticle } from 'boost/actions'
|
import { unlockStatus, clearNewArticle } from 'boost/actions'
|
||||||
|
|
||||||
export default class EditedAlert extends React.Component {
|
export default class EditedAlert extends React.Component {
|
||||||
|
componentDidMount () {
|
||||||
|
ReactDOM.findDOMNode(this.refs.no).focus()
|
||||||
|
}
|
||||||
|
|
||||||
handleNoButtonClick (e) {
|
handleNoButtonClick (e) {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
@@ -22,8 +27,8 @@ export default class EditedAlert extends React.Component {
|
|||||||
<div className='message'>Do you really want to leave without finishing?</div>
|
<div className='message'>Do you really want to leave without finishing?</div>
|
||||||
|
|
||||||
<div className='control'>
|
<div className='control'>
|
||||||
<button onClick={e => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button>
|
<button ref='no' onClick={e => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button>
|
||||||
<button onClick={e => this.handleYesButtonClick(e)} className='primary'><i className='fa fa-fw fa-check'/> Yes</button>
|
<button ref='yes' onClick={e => this.handleYesButtonClick(e)} className='primary'><i className='fa fa-fw fa-check'/> Yes</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
2
main.js
2
main.js
@@ -66,9 +66,7 @@ app.on('ready', function () {
|
|||||||
if (finderProcess) finderProcess.kill()
|
if (finderProcess) finderProcess.kill()
|
||||||
appQuit = true
|
appQuit = true
|
||||||
})
|
})
|
||||||
console.log('Version ' + version)
|
|
||||||
autoUpdater.setFeedURL('https://orbital.b00st.io/rokt33r/boost-app/latest?version=' + version)
|
autoUpdater.setFeedURL('https://orbital.b00st.io/rokt33r/boost-app/latest?version=' + version)
|
||||||
autoUpdater.checkForUpdates()
|
|
||||||
|
|
||||||
var template = require('./atom-lib/menu-template')
|
var template = require('./atom-lib/menu-template')
|
||||||
var menu = Menu.buildFromTemplate(template)
|
var menu = Menu.buildFromTemplate(template)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"version": "0.4.2",
|
"version": "0.4.3",
|
||||||
"description": "Boost App",
|
"description": "Boost App",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user