mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 08:38:37 +00:00
feat: add seasonal halloween theme
This commit is contained in:
@@ -51,12 +51,11 @@ export default observer(() => {
|
|||||||
state.settings.set("appearance:seasonal", !seasonalTheme);
|
state.settings.set("appearance:seasonal", !seasonalTheme);
|
||||||
|
|
||||||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||||
|
const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9
|
||||||
const snowflakes = useMemo(() => {
|
const snowflakes = useMemo(() => {
|
||||||
const flakes = [];
|
const flakes = [];
|
||||||
|
|
||||||
// Disable outside of December
|
if (isDecember) {
|
||||||
if (!isDecember) return [];
|
|
||||||
|
|
||||||
for (let i = 0; i < 15; i++) {
|
for (let i = 0; i < 15; i++) {
|
||||||
flakes.push("❄️");
|
flakes.push("❄️");
|
||||||
flakes.push("❄");
|
flakes.push("❄");
|
||||||
@@ -69,6 +68,23 @@ export default observer(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return flakes;
|
return flakes;
|
||||||
|
}
|
||||||
|
if (isOctober) {
|
||||||
|
for (let i = 0; i < 15; i++) {
|
||||||
|
flakes.push("🎃");
|
||||||
|
flakes.push("💀");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < 2; i++) {
|
||||||
|
flakes.push("👻");
|
||||||
|
flakes.push("⚰️");
|
||||||
|
flakes.push("🕷️");
|
||||||
|
}
|
||||||
|
|
||||||
|
return flakes;
|
||||||
|
}
|
||||||
|
|
||||||
|
else return [];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user