mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd3d1607a4 | ||
|
|
abbc0fbcf1 | ||
|
|
499c3f2e13 | ||
|
|
627845f6e4 | ||
|
|
07eea76057 |
@@ -125,6 +125,12 @@ export default class ArticleEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleMouseUp (e) {
|
handleMouseUp (e) {
|
||||||
|
let { article } = this.props
|
||||||
|
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
|
||||||
|
if (!showPreview) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
switch (this.state.switchPreview) {
|
switch (this.state.switchPreview) {
|
||||||
case 'blur':
|
case 'blur':
|
||||||
switch (e.button) {
|
switch (e.button) {
|
||||||
@@ -144,6 +150,12 @@ export default class ArticleEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleMouseMove (e) {
|
handleMouseMove (e) {
|
||||||
|
let { article } = this.props
|
||||||
|
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
|
||||||
|
if (!showPreview) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if (this.state.switchPreview === 'blur' && this.isMouseDown) {
|
if (this.state.switchPreview === 'blur' && this.isMouseDown) {
|
||||||
this.moveCount++
|
this.moveCount++
|
||||||
if (this.moveCount > 5) {
|
if (this.moveCount > 5) {
|
||||||
@@ -153,6 +165,12 @@ export default class ArticleEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleMouseDowm (e) {
|
handleMouseDowm (e) {
|
||||||
|
let { article } = this.props
|
||||||
|
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
|
||||||
|
if (!showPreview) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
switch (this.state.switchPreview) {
|
switch (this.state.switchPreview) {
|
||||||
case 'blur':
|
case 'blur':
|
||||||
switch (e.button) {
|
switch (e.button) {
|
||||||
|
|||||||
@@ -25,6 +25,15 @@ window.addEventListener('online', function () {
|
|||||||
ipc.send('check-update', 'check-update')
|
ipc.send('check-update', 'check-update')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.addEventListener('drop', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
})
|
||||||
|
document.addEventListener('dragover', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
})
|
||||||
|
|
||||||
function notify (title, options) {
|
function notify (title, options) {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
options.icon = path.join('file://', global.__dirname, '../../resources/app.png')
|
options.icon = path.join('file://', global.__dirname, '../../resources/app.png')
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
global-reset()
|
global-reset()
|
||||||
@import '../shared/*'
|
@import '../shared/*'
|
||||||
@import './ArticleNavigator'
|
@import './ArticleNavigator'
|
||||||
@import './ArticleTopbar'
|
@import './ArticleTopBar'
|
||||||
@import './ArticleList'
|
@import './ArticleList'
|
||||||
@import './ArticleDetail'
|
@import './ArticleDetail'
|
||||||
@import './modal/*'
|
@import './modal/*'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"version": "0.5.7",
|
"version": "0.5.8",
|
||||||
"description": "Boostnote",
|
"description": "Boostnote",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
"babel-preset-react": "^6.3.13",
|
"babel-preset-react": "^6.3.13",
|
||||||
"babel-preset-react-hmre": "^1.0.1",
|
"babel-preset-react-hmre": "^1.0.1",
|
||||||
"css-loader": "^0.19.0",
|
"css-loader": "^0.19.0",
|
||||||
"electron-packager": "^5.1.0",
|
"electron-packager": "^6.0.0",
|
||||||
"electron-prebuilt": "^0.36.11",
|
"electron-prebuilt": "^0.36.11",
|
||||||
"electron-release": "^2.2.0",
|
"electron-release": "^2.2.0",
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
|
|||||||
Reference in New Issue
Block a user