Splash screen

This commit is contained in:
syuilo
2021-03-05 13:51:22 +09:00
parent f871cf1053
commit 54bcb80b44
4 changed files with 26 additions and 22 deletions

View File

@ -220,11 +220,23 @@ components(app);
await router.isReady();
//document.body.innerHTML = '<div id="app"></div>';
const splash = document.getElementById('splash');
// 念のためnullチェック(HTMLが古い場合があるため(そのうち消す))
if (splash) splash.addEventListener('transitionend', () => {
splash.remove();
});
const rootEl = document.createElement('div');
document.body.appendChild(rootEl);
app.mount(rootEl);
app.mount('body');
reactionPicker.init();
if (splash) {
splash.style.opacity = '0';
splash.style.pointerEvents = 'none';
}
watch(defaultStore.reactiveState.darkMode, (darkMode) => {
import('@/scripts/theme').then(({ builtinThemes }) => {
const themes = builtinThemes.concat(getThemes());