web/settings: make old settings migration use initial schema

This commit is contained in:
dumbmoron 2024-07-24 10:27:06 +00:00
parent 49973eceb1
commit 7a5e4c56d3
No known key found for this signature in database

View file

@ -1,6 +1,4 @@
import type { RecursivePartial } from "$lib/types/generic";
import type { CobaltSettings } from "$lib/types/settings";
import defaultSettings from "./defaults";
import type { AllPartialSettingsWithSchema } from "$lib/types/settings";
const oldSwitcherValues = {
theme: ['auto', 'light', 'dark'],
@ -85,8 +83,8 @@ export const migrateOldSettings = () => {
return;
}
const migrated: RecursivePartial<CobaltSettings> = {
schemaVersion: defaultSettings.schemaVersion,
const migrated: AllPartialSettingsWithSchema = {
schemaVersion: 2,
appearance: {
theme: getLiteral('theme'),
reduceTransparency: getBool('reduceTransparency'),