mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-22 18:02:42 +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:
@@ -1,2 +1,14 @@
|
||||
import type {LayoutLoad} from "./$types"
|
||||
import {browser} from "$app/environment"
|
||||
import {charaFileFromUriComponent} from "$lib/share/share-url"
|
||||
|
||||
export const prerender = true
|
||||
export const trailingSlash = "always"
|
||||
|
||||
export const load = (async ({url, data, fetch}) => {
|
||||
const importFile = new URLSearchParams(url.search).get("import")
|
||||
return {
|
||||
...data,
|
||||
importFile: browser && importFile ? await charaFileFromUriComponent(importFile, fetch) : undefined,
|
||||
}
|
||||
}) satisfies LayoutLoad
|
||||
|
||||
Reference in New Issue
Block a user