mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
remove confirmDeletion function
This commit is contained in:
@@ -33,26 +33,6 @@ class Detail extends React.Component {
|
||||
ee.off('detail:delete', this.deleteHandler)
|
||||
}
|
||||
|
||||
confirmDeletion (permanent) {
|
||||
if (this.props.config.ui.confirmDeletion || permanent) {
|
||||
const electron = require('electron')
|
||||
const { remote } = electron
|
||||
const { dialog } = remote
|
||||
|
||||
const alertConfig = {
|
||||
type: 'warning',
|
||||
message: i18n.__('Confirm note deletion'),
|
||||
detail: i18n.__('This will permanently remove this note.'),
|
||||
buttons: [i18n.__('Confirm'), i18n.__('Cancel')]
|
||||
}
|
||||
|
||||
const dialogueButtonIndex = dialog.showMessageBox(remote.getCurrentWindow(), alertConfig)
|
||||
return dialogueButtonIndex === 0
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
render () {
|
||||
const { location, data, config } = this.props
|
||||
let note = null
|
||||
|
||||
Reference in New Issue
Block a user