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