summaryrefslogtreecommitdiff
path: root/src/client/init.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-03-05 13:51:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-03-05 13:51:22 +0900
commit54bcb80b447805f673e875ee98fd849879b73a4f (patch)
treedf2e027f773a0b6b8f937a82d7868fdf71bbfc09 /src/client/init.ts
parentImprove reaction picker performance (diff)
downloadsharkey-54bcb80b447805f673e875ee98fd849879b73a4f.tar.gz
sharkey-54bcb80b447805f673e875ee98fd849879b73a4f.tar.bz2
sharkey-54bcb80b447805f673e875ee98fd849879b73a4f.zip
Splash screen :sparkles:
Diffstat (limited to 'src/client/init.ts')
-rw-r--r--src/client/init.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index 596312ff71..1c44e7f23e 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -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());