parent
54a92c5d79
commit
e630ae664c
2 changed files with 6 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ const ThemeConfig: Process = {
|
|||
const { Input, Button } = await process.loadLibrary('lib/Components')
|
||||
|
||||
const win = wm.createWindow({
|
||||
title: 'Task Manager',
|
||||
title: 'Theme Maker',
|
||||
icon,
|
||||
width: 600,
|
||||
height: 200
|
||||
|
|
|
|||
|
|
@ -61,14 +61,15 @@ const WindowManager: Library = {
|
|||
win
|
||||
}
|
||||
}
|
||||
document.dispatchEvent(new CustomEvent('app_opened', appOpenedEvent))
|
||||
|
||||
const { Button } = await process.loadLibrary('lib/Components')
|
||||
|
||||
return {
|
||||
value: await new Promise((resolve) => {
|
||||
new HTML('h3').text(title).appendTo(win.content)
|
||||
new HTML('p').text(text).appendTo(win.content)
|
||||
new HTML('h3').text(title).style({ margin: '0' }).appendTo(win.content)
|
||||
new HTML('p').text(text).style({ margin: '0' }).appendTo(win.content)
|
||||
|
||||
if (type === 'allow') document.dispatchEvent(new CustomEvent('app_opened', appOpenedEvent))
|
||||
|
||||
if (type === 'allow') {
|
||||
Button.new().text('Allow').appendTo(win.content).on('click', () => {
|
||||
|
|
@ -81,8 +82,8 @@ const WindowManager: Library = {
|
|||
})
|
||||
} else if (type === 'ok') {
|
||||
Button.new().text('OK').appendTo(win.content).on('click', () => {
|
||||
resolve(true)
|
||||
win.close()
|
||||
resolve(true)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue