mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Remove a menu which is shown on clicked the trash button
This commit is contained in:
@@ -181,16 +181,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleContextButtonClick (e) {
|
handleDeleteButtonClick (e) {
|
||||||
let menu = new Menu()
|
|
||||||
menu.append(new MenuItem({
|
|
||||||
label: 'Delete',
|
|
||||||
click: (e) => this.handleDeleteMenuClick(e)
|
|
||||||
}))
|
|
||||||
menu.popup(remote.getCurrentWindow())
|
|
||||||
}
|
|
||||||
|
|
||||||
handleDeleteMenuClick (e) {
|
|
||||||
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
|
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: 'Delete a note',
|
message: 'Delete a note',
|
||||||
@@ -291,7 +282,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
)
|
)
|
||||||
})()}
|
})()}
|
||||||
<button styleName='control-trashButton'
|
<button styleName='control-trashButton'
|
||||||
onClick={(e) => this.handleContextButtonClick(e)}
|
onClick={(e) => this.handleDeleteButtonClick(e)}
|
||||||
>
|
>
|
||||||
<svg height='17px' id='Capa_1' style={{enableBackground: 'new 0 0 753.23 753.23'}} width='17px' version='1.1' viewBox='0 0 753.23 753.23' x='0px' y='0px' xmlSpace='preserve'>
|
<svg height='17px' id='Capa_1' style={{enableBackground: 'new 0 0 753.23 753.23'}} width='17px' version='1.1' viewBox='0 0 753.23 753.23' x='0px' y='0px' xmlSpace='preserve'>
|
||||||
<g>
|
<g>
|
||||||
|
|||||||
Reference in New Issue
Block a user