mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-11 00:36:26 +00:00
18 lines
318 B
JavaScript
18 lines
318 B
JavaScript
const { remote } = require('electron')
|
|
const { Menu, MenuItem } = remote
|
|
|
|
function popup(templates) {
|
|
const menu = new Menu()
|
|
templates.forEach(item => {
|
|
menu.append(new MenuItem(item))
|
|
})
|
|
menu.popup(remote.getCurrentWindow())
|
|
}
|
|
|
|
const context = {
|
|
popup
|
|
}
|
|
|
|
module.export = context
|
|
export default context
|