mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-25 00:20:57 -05:00
feat: add seasonal halloween theme (#784)
Co-authored-by: Sophie L <beartechtalks@gmail.com>
This commit is contained in:
parent
b649b2a923
commit
9b6abe374a
1 changed files with 25 additions and 9 deletions
|
@ -51,12 +51,11 @@ export default observer(() => {
|
|||
state.settings.set("appearance:seasonal", !seasonalTheme);
|
||||
|
||||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||
const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9
|
||||
const snowflakes = useMemo(() => {
|
||||
const flakes = [];
|
||||
|
||||
// Disable outside of December
|
||||
if (!isDecember) return [];
|
||||
|
||||
if (isDecember) {
|
||||
for (let i = 0; i < 15; i++) {
|
||||
flakes.push("❄️");
|
||||
flakes.push("❄");
|
||||
|
@ -68,6 +67,23 @@ export default observer(() => {
|
|||
flakes.push("⛄");
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return flakes;
|
||||
}, []);
|
||||
|
||||
|
|
Loading…
Reference in a new issue