web/settings: add duck to settings types

This commit is contained in:
wukko 2024-12-22 23:04:20 +06:00
parent 52b7f9523f
commit a9515d376a
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
3 changed files with 14 additions and 3 deletions

View file

@ -2,9 +2,10 @@ import { defaultLocale } from "$lib/i18n/translations";
import type { CobaltSettings } from "$lib/types/settings";
const defaultSettings: CobaltSettings = {
schemaVersion: 4,
schemaVersion: 5,
advanced: {
debug: false,
duck: false,
},
appearance: {
theme: "auto",

View file

@ -2,14 +2,16 @@ import type { RecursivePartial } from "$lib/types/generic";
import type { CobaltSettingsV2 } from "$lib/types/settings/v2";
import type { CobaltSettingsV3 } from "$lib/types/settings/v3";
import type { CobaltSettingsV4 } from "$lib/types/settings/v4";
import type { CobaltSettingsV5 } from "$lib/types/settings/v5";
export * from "$lib/types/settings/v2";
export * from "$lib/types/settings/v3";
export * from "$lib/types/settings/v4";
export * from "$lib/types/settings/v5";
export type CobaltSettings = CobaltSettingsV4;
export type CobaltSettings = CobaltSettingsV5;
export type AnyCobaltSettings = CobaltSettingsV3 | CobaltSettingsV2 | CobaltSettings;
export type AnyCobaltSettings = CobaltSettingsV4 | CobaltSettingsV3 | CobaltSettingsV2 | CobaltSettings;
export type PartialSettings = RecursivePartial<CobaltSettings>;

View file

@ -0,0 +1,8 @@
import { type CobaltSettingsV4 } from "$lib/types/settings/v4";
export type CobaltSettingsV5 = Omit<CobaltSettingsV4, 'schemaVersion' | 'advanced'> & {
schemaVersion: 5,
advanced: CobaltSettingsV4['advanced'] & {
duck: boolean;
};
};