Private
Public Access
1
0

Add tenant branding & theming system with admin UI

Tenant admins can now customize their workspace appearance: page/nav
backgrounds (solid, gradient, or image), column/card colors, borders,
text, opacity with glass blur, card corner radius, and accent colors.
Light and dark mode are configured separately. Theme CSS is injected
server-side via transformPageChunk to prevent FOUC.

Includes avatar components, account page updates, and pre-existing
type error fixes (Buffer, async onMount, InputJsonValue).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-26 21:56:39 -05:00
parent 029b467eae
commit 3a11ed01e9
30 changed files with 1709 additions and 60 deletions
+43
View File
@@ -1,6 +1,47 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
import type { PrismaClient } from '@prisma/client';
export interface TenantThemeData {
lightPageBg?: string | null;
lightPageBgImage?: string | null;
lightNavBg?: string | null;
lightNavBgImage?: string | null;
lightColumnBg?: string | null;
lightColumnBorder?: string | null;
lightColumnText?: string | null;
lightColumnOpacity?: number | null;
lightCardBg?: string | null;
lightCardBorder?: string | null;
lightCardText?: string | null;
lightCardOpacity?: number | null;
lightCardRadius?: string | null;
lightPrimary?: string | null;
lightPrimaryHover?: string | null;
lightDanger?: string | null;
lightDangerHover?: string | null;
lightSuccess?: string | null;
lightWarning?: string | null;
darkPageBg?: string | null;
darkPageBgImage?: string | null;
darkNavBg?: string | null;
darkNavBgImage?: string | null;
darkColumnBg?: string | null;
darkColumnBorder?: string | null;
darkColumnText?: string | null;
darkColumnOpacity?: number | null;
darkCardBg?: string | null;
darkCardBorder?: string | null;
darkCardText?: string | null;
darkCardOpacity?: number | null;
darkCardRadius?: string | null;
darkPrimary?: string | null;
darkPrimaryHover?: string | null;
darkDanger?: string | null;
darkDangerHover?: string | null;
darkSuccess?: string | null;
darkWarning?: string | null;
}
declare global {
namespace App {
interface Error {
@@ -12,6 +53,7 @@ declare global {
id: string;
name: string;
slug: string;
theme?: TenantThemeData | null;
} | null;
user: {
id: string;
@@ -19,6 +61,7 @@ declare global {
name: string;
globalRole: string;
tenantRole: string | null;
avatarUrl: string | null;
} | null;
session: {
id: string;