2020-11-11 17:17:37 +00:00
|
|
|
import {html, render} from 'htm/preact';
|
|
|
|
import {
|
|
|
|
initializeBackgroundMessageHandler,
|
|
|
|
getManifest,
|
|
|
|
getSettings,
|
|
|
|
PageFooter,
|
|
|
|
PageHeader,
|
2020-11-14 17:24:20 +00:00
|
|
|
PageMain,
|
|
|
|
saveSettings
|
2020-11-11 17:17:37 +00:00
|
|
|
} from '.';
|
|
|
|
|
|
|
|
(async () => {
|
|
|
|
initializeBackgroundMessageHandler();
|
|
|
|
|
|
|
|
const manifest = getManifest();
|
|
|
|
const settings = await getSettings();
|
|
|
|
|
2020-11-14 17:24:20 +00:00
|
|
|
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} />
|
2020-11-14 17:24:20 +00:00
|
|
|
<${PageFooter}
|
|
|
|
manifest=${manifest}
|
|
|
|
showVersionUpdated=${showVersionUpdated}
|
|
|
|
/>
|
2020-11-11 17:17:37 +00:00
|
|
|
`,
|
|
|
|
document.body
|
|
|
|
);
|
|
|
|
})();
|