mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 17:32:41 +00:00
feat: layout url import
feat: backup import (except chords) feat: legacy layout import feat: separate layout, chord & setting backup downloads
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
import {runLayoutDetection} from "$lib/os-layout.js"
|
||||
import PageTransition from "./PageTransition.svelte"
|
||||
import SyncOverlay from "./SyncOverlay.svelte"
|
||||
import {restoreFromFile} from "$lib/backup/backup"
|
||||
import {goto} from "$app/navigation"
|
||||
|
||||
const locale = ((browser && localStorage.getItem("locale")) as Locales) || detectLocale()
|
||||
loadLocale(locale)
|
||||
@@ -57,6 +59,12 @@
|
||||
if (browser && $userPreferences.autoConnect && (await canAutoConnect())) {
|
||||
await initSerial()
|
||||
}
|
||||
if (data.importFile) {
|
||||
restoreFromFile(data.importFile)
|
||||
const url = new URL(location.href)
|
||||
url.searchParams.delete("import")
|
||||
await goto(url.href, {replaceState: true})
|
||||
}
|
||||
})
|
||||
|
||||
let webManifestLink = ""
|
||||
|
||||
Reference in New Issue
Block a user