mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/settings: make old settings migration use initial schema
This commit is contained in:
parent
49973eceb1
commit
7a5e4c56d3
1 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,4 @@
|
||||||
import type { RecursivePartial } from "$lib/types/generic";
|
import type { AllPartialSettingsWithSchema } from "$lib/types/settings";
|
||||||
import type { CobaltSettings } from "$lib/types/settings";
|
|
||||||
import defaultSettings from "./defaults";
|
|
||||||
|
|
||||||
const oldSwitcherValues = {
|
const oldSwitcherValues = {
|
||||||
theme: ['auto', 'light', 'dark'],
|
theme: ['auto', 'light', 'dark'],
|
||||||
|
@ -85,8 +83,8 @@ export const migrateOldSettings = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const migrated: RecursivePartial<CobaltSettings> = {
|
const migrated: AllPartialSettingsWithSchema = {
|
||||||
schemaVersion: defaultSettings.schemaVersion,
|
schemaVersion: 2,
|
||||||
appearance: {
|
appearance: {
|
||||||
theme: getLiteral('theme'),
|
theme: getLiteral('theme'),
|
||||||
reduceTransparency: getBool('reduceTransparency'),
|
reduceTransparency: getBool('reduceTransparency'),
|
||||||
|
|
Loading…
Reference in a new issue