mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Remove Ctrl-G because it's unneccessary and conflicts with CodeMirror
This commit is contained in:
@@ -49,10 +49,6 @@ class NoteList extends React.Component {
|
||||
this.importFromFileHandler = this.importFromFile.bind(this)
|
||||
this.jumpNoteByHash = this.jumpNoteByHashHandler.bind(this)
|
||||
|
||||
this.jumpToTopHandler = () => {
|
||||
this.jumpToTop()
|
||||
}
|
||||
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
@@ -63,8 +59,6 @@ class NoteList extends React.Component {
|
||||
ee.on('list:prior', this.selectPriorNoteHandler)
|
||||
ee.on('list:focus', this.focusHandler)
|
||||
ee.on('list:isMarkdownNote', this.alertIfSnippetHandler)
|
||||
ee.on('list:top', this.jumpToTopHandler)
|
||||
ee.on('list:jumpToTop', this.jumpToTopHandler)
|
||||
ee.on('import:file', this.importFromFileHandler)
|
||||
ee.on('list:jump', this.jumpNoteByHash)
|
||||
}
|
||||
@@ -86,8 +80,6 @@ class NoteList extends React.Component {
|
||||
ee.off('list:prior', this.selectPriorNoteHandler)
|
||||
ee.off('list:focus', this.focusHandler)
|
||||
ee.off('list:isMarkdownNote', this.alertIfSnippetHandler)
|
||||
ee.off('list:top', this.jumpToTopHandler)
|
||||
ee.off('list:jumpToTop', this.jumpToTopHandler)
|
||||
ee.off('import:file', this.importFromFileHandler)
|
||||
ee.off('list:jump', this.jumpNoteByHash)
|
||||
}
|
||||
@@ -340,23 +332,6 @@ class NoteList extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
jumpToTop () {
|
||||
if (this.notes === null || this.notes.length === 0) {
|
||||
return
|
||||
}
|
||||
let { router } = this.context
|
||||
let { location } = this.props
|
||||
|
||||
const targetIndex = 0
|
||||
|
||||
router.push({
|
||||
pathname: location.pathname,
|
||||
query: {
|
||||
key: this.notes[targetIndex].storage + '-' + this.notes[targetIndex].key
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
handleDragStart (e, note) {
|
||||
const noteData = JSON.stringify(note)
|
||||
e.dataTransfer.setData('note', noteData)
|
||||
|
||||
@@ -197,13 +197,6 @@ const view = {
|
||||
mainWindow.webContents.send('list:prior')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Jump to Top',
|
||||
accelerator: 'Control+G',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:jumpToTop')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user