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:
Vendored
+43
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user