mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-02 08:26:22 +01:00
web/settings/v4: add api key settings, remove override settings
This commit is contained in:
parent
5b60065c9f
commit
baebeed488
4 changed files with 21 additions and 10 deletions
|
@ -2,7 +2,7 @@ import { defaultLocale } from "$lib/i18n/translations";
|
|||
import type { CobaltSettings } from "$lib/types/settings";
|
||||
|
||||
const defaultSettings: CobaltSettings = {
|
||||
schemaVersion: 3,
|
||||
schemaVersion: 4,
|
||||
advanced: {
|
||||
debug: false,
|
||||
},
|
||||
|
@ -33,10 +33,10 @@ const defaultSettings: CobaltSettings = {
|
|||
disableAnalytics: false,
|
||||
},
|
||||
processing: {
|
||||
allowDefaultOverride: false,
|
||||
customInstanceURL: "",
|
||||
customApiKey: "",
|
||||
enableCustomInstances: false,
|
||||
seenOverrideWarning: false,
|
||||
enableCustomApiKey: false,
|
||||
seenCustomWarning: false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import type { RecursivePartial } from "$lib/types/generic";
|
||||
import type { CobaltSettingsV2 } from "./settings/v2";
|
||||
import type { CobaltSettingsV3 } from "./settings/v3";
|
||||
import type { CobaltSettingsV2 } from "$lib/types/settings/v2";
|
||||
import type { CobaltSettingsV3 } from "$lib/types/settings/v3";
|
||||
import type { CobaltSettingsV4 } from "$lib/types/settings/v4";
|
||||
|
||||
export * from "./settings/v2";
|
||||
export * from "./settings/v3";
|
||||
export * from "$lib/types/settings/v2";
|
||||
export * from "$lib/types/settings/v3";
|
||||
export * from "$lib/types/settings/v4";
|
||||
|
||||
export type CobaltSettings = CobaltSettingsV3;
|
||||
export type CobaltSettings = CobaltSettingsV4;
|
||||
|
||||
export type AnyCobaltSettings = CobaltSettingsV2 | CobaltSettings;
|
||||
export type AnyCobaltSettings = CobaltSettingsV3 | CobaltSettingsV2 | CobaltSettings;
|
||||
|
||||
export type PartialSettings = RecursivePartial<CobaltSettings>;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { YoutubeLang } from "$lib/settings/youtube-lang";
|
||||
import { type CobaltSettingsV2 } from "./v2";
|
||||
import { type CobaltSettingsV2 } from "$lib/types/settings/v2";
|
||||
|
||||
export type CobaltSettingsV3 = Omit<CobaltSettingsV2, 'schemaVersion' | 'save'> & {
|
||||
schemaVersion: 3,
|
||||
|
|
9
web/src/lib/types/settings/v4.ts
Normal file
9
web/src/lib/types/settings/v4.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { type CobaltSettingsV3 } from "$lib/types/settings/v3";
|
||||
|
||||
export type CobaltSettingsV4 = Omit<CobaltSettingsV3, 'schemaVersion' | 'processing'> & {
|
||||
schemaVersion: 4,
|
||||
processing: Omit<CobaltSettingsV3['processing'], 'allowDefaultOverride' | 'seenOverrideWarning'> & {
|
||||
customApiKey: string;
|
||||
enableCustomApiKey: boolean;
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue