feat(notifications): add account-scoped inbox and persistent preferences
CI / check (push) Failing after 1m18s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
Simo committed 2026-09-13 17:59:22 +02:00
1 parent 8f55ff2d17
commit 1eee6661f9
39 files changed
+1559 -3

No files matched your search

+21 -3
View File
@@ -8,6 +8,7 @@ import { TicketsTable } from "@/app/admin/tickets/tickets-table";
import { ArticleForm } from "@/components/admin/article-form";
import { FurnitureSyncQueue } from "@/components/admin/studio/furniture-sync-queue";
import { StudioClient } from "@/components/admin/studio/studio-client";
import { NotificationCenter } from "@/features/notifications/notification-center";
import type { ArticleSaveResult } from "@/lib/article-input";
import { buildFurniImportSource } from "@/lib/habbo-gamedata-hotel";
import { themePaletteCss } from "@/lib/theme-css";
@@ -25,6 +26,11 @@ theme.textContent = themePaletteCss(
);
document.head.appendChild(theme);
const route = window.location.pathname;
if (route.includes("notifications")) {
document.documentElement.classList.add("app");
document.body.classList.add("site-bg");
document.body.style.backgroundColor = "var(--color-background)";
}
const root = document.getElementById("root");
if (!root) throw Error("Fixture root missing");
const rows = [
@@ -96,8 +102,18 @@ createRoot(root).render(
now={new Date("2030-01-01T12:00:00Z")}
messages={messages}
>
<main data-admin className="min-w-0 mx-auto max-w-6xl p-5">
<h1 className="mb-5 text-2xl font-bold">
<main
data-admin={route.includes("notifications") ? undefined : ""}
className={
route.includes("notifications")
? "min-w-0 mx-auto max-w-7xl px-3 py-3 md:px-6 md:py-6"
: "min-w-0 mx-auto max-w-6xl p-5"
}
>
<h1
hidden={route.includes("notifications")}
className="mb-5 text-2xl font-bold"
>
{route.includes("settings")
? "CMS settings"
: route.includes("tickets")
@@ -106,7 +122,9 @@ createRoot(root).render(
? "News editor"
: "Furniture synchronization"}
</h1>
{route.includes("unsaved-harness") ? (
{route.includes("notifications") ? (
<NotificationCenter userId={7} />
) : route.includes("unsaved-harness") ? (
<UnsavedHarness />
) : route.includes("studio-harness") ? (
<StudioClient