diff --git a/web/src/components/settings/TransferSettings.svelte b/web/src/components/settings/TransferSettings.svelte new file mode 100644 index 00000000..d73bf6b7 --- /dev/null +++ b/web/src/components/settings/TransferSettings.svelte @@ -0,0 +1,68 @@ + + +
+ + import + + + export + +
+ + \ No newline at end of file diff --git a/web/src/lib/state/settings.ts b/web/src/lib/state/settings.ts index e19c50bb..231d21b3 100644 --- a/web/src/lib/state/settings.ts +++ b/web/src/lib/state/settings.ts @@ -41,6 +41,7 @@ const migrate = (settings: AllPartialSettingsWithSchema): PartialSettings => { }, settings as AllPartialSettingsWithSchema); } + const loadFromStorage = () => { const settings = localStorage.getItem('settings'); if (!settings) { @@ -52,6 +53,10 @@ const loadFromStorage = () => { return {}; } + return loadFromString(settings); +} + +export const loadFromString = (settings: string) => { const parsed = JSON.parse(settings) as AllPartialSettingsWithSchema; if (parsed.schemaVersion < defaultSettings.schemaVersion) { return migrate(parsed); diff --git a/web/src/routes/settings/advanced/+page.svelte b/web/src/routes/settings/advanced/+page.svelte index 6ac2b73e..3d7e732d 100644 --- a/web/src/routes/settings/advanced/+page.svelte +++ b/web/src/routes/settings/advanced/+page.svelte @@ -1,9 +1,10 @@ - @@ -16,5 +17,6 @@ +