queue/source/settings-page.ts

36 lines
712 B
TypeScript
Raw Normal View History

2020-11-11 17:17:37 +00:00
import {html, render} from 'htm/preact';
import {
initializeBackgroundMessageHandler,
getManifest,
getSettings,
PageFooter,
PageHeader,
PageMain,
saveSettings
2020-11-11 17:17:37 +00:00
} from '.';
(async () => {
initializeBackgroundMessageHandler();
const manifest = getManifest();
const settings = await getSettings();
const showVersionUpdated = settings.versionGotUpdated;
if (showVersionUpdated) {
settings.versionGotUpdated = false;
await saveSettings(settings);
}
2020-11-11 17:17:37 +00:00
render(
html`
<${PageHeader} />
<${PageMain} settings=${settings} />
<${PageFooter}
manifest=${manifest}
showVersionUpdated=${showVersionUpdated}
/>
2020-11-11 17:17:37 +00:00
`,
document.body
);
})();