mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
18 lines
321 B
JavaScript
18 lines
321 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
|