mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-24 10:32:09 +02:00
web/settings: make old settings migration use initial schema
This commit is contained in:
parent
49973eceb1
commit
7a5e4c56d3
@ -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…
x
Reference in New Issue
Block a user