mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
clean old code
This commit is contained in:
@@ -32,7 +32,6 @@ export default class ArticleEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
console.log(this.state.switchPreview)
|
|
||||||
ipc.on('config-apply', this.configApplyHandler)
|
ipc.on('config-apply', this.configApplyHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import moment from 'moment'
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import {
|
import {
|
||||||
switchFolder,
|
switchFolder,
|
||||||
updateArticle,
|
updateArticle
|
||||||
// cacheArticle,
|
|
||||||
// saveArticle,
|
|
||||||
// uncacheArticle
|
|
||||||
} from '../../actions'
|
} from '../../actions'
|
||||||
import linkState from 'browser/lib/linkState'
|
import linkState from 'browser/lib/linkState'
|
||||||
import TagSelect from 'browser/components/TagSelect'
|
import TagSelect from 'browser/components/TagSelect'
|
||||||
@@ -19,22 +16,6 @@ import ArticleEditor from './ArticleEditor'
|
|||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const ipc = electron.ipcRenderer
|
const ipc = electron.ipcRenderer
|
||||||
|
|
||||||
// const remote = electron.remote
|
|
||||||
// const { Menu, MenuItem } = remote
|
|
||||||
// const othersMenu = new Menu()
|
|
||||||
// othersMenu.append(new MenuItem({
|
|
||||||
// label: 'Delete Post',
|
|
||||||
// click: function () {
|
|
||||||
// remote.getCurrentWebContents().send('detail-delete')
|
|
||||||
// }
|
|
||||||
// }))
|
|
||||||
// othersMenu.append(new MenuItem({
|
|
||||||
// label: 'Discard Change',
|
|
||||||
// click: function (item) {
|
|
||||||
// remote.getCurrentWebContents().send('detail-uncache')
|
|
||||||
// }
|
|
||||||
// }))
|
|
||||||
|
|
||||||
const BRAND_COLOR = '#18AF90'
|
const BRAND_COLOR = '#18AF90'
|
||||||
const OSX = global.process.platform === 'darwin'
|
const OSX = global.process.platform === 'darwin'
|
||||||
|
|
||||||
@@ -80,10 +61,6 @@ export default class ArticleDetail extends React.Component {
|
|||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.saveHandler = e => {
|
|
||||||
if (isModalOpen()) return true
|
|
||||||
this.handleSaveButtonClick()
|
|
||||||
}
|
|
||||||
this.deleteHandler = e => {
|
this.deleteHandler = e => {
|
||||||
if (isModalOpen()) return true
|
if (isModalOpen()) return true
|
||||||
this.handleDeleteButtonClick()
|
this.handleDeleteButtonClick()
|
||||||
@@ -119,7 +96,6 @@ export default class ArticleDetail extends React.Component {
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ipc.on('detail-save', this.saveHandler)
|
|
||||||
ipc.on('detail-delete', this.deleteHandler)
|
ipc.on('detail-delete', this.deleteHandler)
|
||||||
ipc.on('detail-uncache', this.uncacheHandler)
|
ipc.on('detail-uncache', this.uncacheHandler)
|
||||||
ipc.on('detail-title', this.titleHandler)
|
ipc.on('detail-title', this.titleHandler)
|
||||||
@@ -130,7 +106,6 @@ export default class ArticleDetail extends React.Component {
|
|||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
clearInterval(this.refreshTimer)
|
clearInterval(this.refreshTimer)
|
||||||
|
|
||||||
// ipc.removeListener('detail-save', this.saveHandler)
|
|
||||||
ipc.removeListener('detail-delete', this.deleteHandler)
|
ipc.removeListener('detail-delete', this.deleteHandler)
|
||||||
ipc.removeListener('detail-uncache', this.uncacheHandler)
|
ipc.removeListener('detail-uncache', this.uncacheHandler)
|
||||||
ipc.removeListener('detail-title', this.titleHandler)
|
ipc.removeListener('detail-title', this.titleHandler)
|
||||||
|
|||||||
Reference in New Issue
Block a user