mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-05-09 23:22:20 +00:00
Migration to Svelte 5 (using the migration script)
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<script>
|
||||
import { run } from 'svelte/legacy';
|
||||
|
||||
import StorageViewer from "$components/debugging/StorageViewer.svelte";
|
||||
import { page } from "$app/stores";
|
||||
import { goto } from "$app/navigation";
|
||||
|
||||
let pathString = '';
|
||||
let pathString = $state('');
|
||||
/** @type {string[]} */
|
||||
let pathArray = [];
|
||||
let pathArray = $state([]);
|
||||
/** @type {string|undefined} */
|
||||
let storageName = void 0;
|
||||
let storageName = $state(void 0);
|
||||
|
||||
$: {
|
||||
run(() => {
|
||||
pathString = $page.params.path;
|
||||
pathArray = pathString.length ? pathString.split("/") : [];
|
||||
storageName = pathArray.shift()
|
||||
@@ -21,7 +23,7 @@
|
||||
if (!storageName) {
|
||||
goto("/preferences/debug/storage");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if storageName}
|
||||
|
||||
Reference in New Issue
Block a user