diff --git a/web/src/lib/components/SettingsPopover.svelte b/web/src/lib/components/SettingsPopover.svelte index 04fb0a9..ac8a3ac 100644 --- a/web/src/lib/components/SettingsPopover.svelte +++ b/web/src/lib/components/SettingsPopover.svelte @@ -1,7 +1,7 @@ @@ -13,7 +13,7 @@ {/snippet} - +
Theme @@ -29,6 +29,11 @@
+ setBrainrotLevel(next as BrainrotLevel)}> + + + +
diff --git a/web/src/lib/components/stats/BrainrotPanel.svelte b/web/src/lib/components/stats/BrainrotPanel.svelte new file mode 100644 index 0000000..0687a0d --- /dev/null +++ b/web/src/lib/components/stats/BrainrotPanel.svelte @@ -0,0 +1,113 @@ + + +
+ {#each videos as video, index (video.title)} + +
+ {#if video.type === "local"} + + {:else} +
+ + +
+ {/if} +
+
+ {/each} +
+ + diff --git a/web/src/lib/components/stats/PaperChanCompanion.svelte b/web/src/lib/components/stats/PaperChanCompanion.svelte new file mode 100644 index 0000000..2526ced --- /dev/null +++ b/web/src/lib/components/stats/PaperChanCompanion.svelte @@ -0,0 +1,89 @@ + + + diff --git a/web/src/lib/components/stats/PaperLogo.svelte b/web/src/lib/components/stats/PaperLogo.svelte new file mode 100644 index 0000000..072e7e6 --- /dev/null +++ b/web/src/lib/components/stats/PaperLogo.svelte @@ -0,0 +1,56 @@ + + + diff --git a/web/src/lib/components/stats/ViewportDvdBouncer.svelte b/web/src/lib/components/stats/ViewportDvdBouncer.svelte new file mode 100644 index 0000000..04731c9 --- /dev/null +++ b/web/src/lib/components/stats/ViewportDvdBouncer.svelte @@ -0,0 +1,121 @@ + + +
+
+ {@render children()} +
+
+ + diff --git a/web/src/lib/settings.svelte.ts b/web/src/lib/settings.svelte.ts index caa73b9..642fa6e 100644 --- a/web/src/lib/settings.svelte.ts +++ b/web/src/lib/settings.svelte.ts @@ -1,6 +1,10 @@ import { PersistedState } from "runed"; export const AUTO_REFRESH_STORAGE_KEY = "auto-refresh"; +export const BRAINROT_STORAGE_KEY = "brainrot"; +export const BRAINROT_LEVEL_STORAGE_KEY = "brainrot-level"; + +export type BrainrotLevel = "off" | "on" | "weeb"; export const autoRefresh = new PersistedState(AUTO_REFRESH_STORAGE_KEY, false, { serializer: { @@ -9,6 +13,32 @@ export const autoRefresh = new PersistedState(AUTO_REFRESH_STORAGE_KEY, false, { }, }); +export const brainrot = new PersistedState(BRAINROT_STORAGE_KEY, false, { + serializer: { + serialize: String, + deserialize: (value) => value === "true", + }, +}); + +export const brainrotLevel = new PersistedState(BRAINROT_LEVEL_STORAGE_KEY, "off", { + serializer: { + serialize: String, + deserialize: (value) => { + if (value === "on" || value === "weeb") return value; + if (value === "paper-chan") return "weeb"; + return "off"; + }, + }, +}); + export function setAutoRefresh(next: boolean): void { autoRefresh.current = next; } + +export function setBrainrot(next: boolean): void { + brainrot.current = next; +} + +export function setBrainrotLevel(next: BrainrotLevel): void { + brainrotLevel.current = next; +} diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 31fb988..e6f3bb2 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -6,9 +6,14 @@ import RefreshButton from "$lib/components/header/RefreshButton.svelte"; import VersionSelect from "$lib/components/header/VersionSelect.svelte"; import PatchesTable from "$lib/components/patches/PatchesTable.svelte"; + import BrainrotPanel from "$lib/components/stats/BrainrotPanel.svelte"; import LeaderboardCard from "$lib/components/stats/LeaderboardCard.svelte"; + import PaperChanCompanion from "$lib/components/stats/PaperChanCompanion.svelte"; + import PaperLogo from "$lib/components/stats/PaperLogo.svelte"; import StatsOverview from "$lib/components/stats/StatsOverview.svelte"; + import ViewportDvdBouncer from "$lib/components/stats/ViewportDvdBouncer.svelte"; import { baseQueryOptions, queryKeys } from "$lib/queries"; + import { brainrotLevel } from "$lib/settings.svelte"; const queryClient = useQueryClient(); @@ -95,3 +100,13 @@ {/if} + +{#if brainrotLevel.current !== "off" && activeView === "stats"} + + + + + {#if brainrotLevel.current === "weeb"} + + {/if} +{/if} diff --git a/web/static/brainrot/paper-chan.png b/web/static/brainrot/paper-chan.png new file mode 100644 index 0000000..8fb92b7 Binary files /dev/null and b/web/static/brainrot/paper-chan.png differ diff --git a/web/static/brainrot/papermc-rebase.mp4 b/web/static/brainrot/papermc-rebase.mp4 new file mode 100644 index 0000000..4617172 Binary files /dev/null and b/web/static/brainrot/papermc-rebase.mp4 differ