(feat): add theming
All checks were successful
/ build-web (push) Successful in 1m24s
/ build-desktop (linux) (push) Successful in 6m51s
/ build-mobile (push) Successful in 15m48s
/ release (push) Successful in 31s

This commit is contained in:
Alois 2026-06-15 21:13:09 +02:00
commit 040d60a35f
6 changed files with 429 additions and 315 deletions

View file

@ -47,6 +47,26 @@ export type Communities = z.infer<
>;
export type Calls = z.infer<typeof ttp.challenge_response.response.shape.calls>;
type Base16Palette = Record<
| "base00"
| "base01"
| "base02"
| "base03"
| "base04"
| "base05"
| "base06"
| "base07"
| "base08"
| "base09"
| "base0A"
| "base0B"
| "base0C"
| "base0D"
| "base0E"
| "base0F",
string
>;
// TTP
const user = z.object({
about: z.string().max(255).optional(),
@ -260,6 +280,11 @@ export interface Storage extends SettingsStorageDefaults {
ttp_server_cert: string;
call_mute_range_start: number;
call_mute_range_end: number;
theme_color: string;
theme_palette: Base16Palette | null;
theme_primary_color: string;
theme_polarity: "dark" | "light" | "system";
theme_tint: "soft" | "hard" | "extreme";
chat_trusted_domains: string[];
chat_picker_saved_media: string[];
chat_picker_last_tab: "gif" | "meme" | "saved";
@ -303,6 +328,11 @@ export const storageDefaults: Storage = {
ttp_server_cert: "",
call_mute_range_start: -55,
call_mute_range_end: -45,
theme_color: "",
theme_palette: null,
theme_primary_color: "",
theme_polarity: "system",
theme_tint: "soft",
chat_trusted_domains: [
// Other platforms
"cdn.discordapp.com",