From 742da2f1e9ee49b5b50bf6332d84bb878bc0f4b6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 16 Dec 2023 13:52:52 +0900 Subject: feat(frontend): 画面に雪を降らせる機能を復活 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/boot/main-boot.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/frontend/src/boot') diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 88e2f83895..e3fd6d5fca 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -20,6 +20,7 @@ import { mainRouter } from '@/router.js'; import { initializeSw } from '@/scripts/initialize-sw.js'; import { deckStore } from '@/ui/deck/deck-store.js'; import { emojiPicker } from '@/scripts/emoji-picker.js'; +import { SnowfallEffect } from '@/scripts/snowfall-effect.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( @@ -75,6 +76,13 @@ export async function mainBoot() { }, }; + if (defaultStore.state.enableSeasonalScreenEffect) { + const month = new Date().getMonth() + 1; + if (month === 12 || month === 1) { + new SnowfallEffect().render(); + } + } + if ($i) { // only add post shortcuts if logged in hotkeys['p|n'] = post; -- cgit v1.2.3-freya