Update to svelte 5
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" context="module">
|
||||
<script lang="ts" module>
|
||||
export type TorrentInfo = {
|
||||
trackers: string[]
|
||||
comment: string,
|
||||
@@ -26,9 +26,12 @@ import { loading_finish, loading_start } from "lib/Loading";
|
||||
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
export let nav: FSNavigator
|
||||
let { nav, children }: {
|
||||
nav: FSNavigator;
|
||||
children?: import('svelte').Snippet;
|
||||
} = $props();
|
||||
|
||||
let status = "loading"
|
||||
let status = $state("loading")
|
||||
|
||||
export const update = async () => {
|
||||
try {
|
||||
@@ -64,11 +67,11 @@ export const update = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
let torrent: TorrentInfo = {} as TorrentInfo
|
||||
let magnet = ""
|
||||
let torrent: TorrentInfo = $state({} as TorrentInfo)
|
||||
let magnet = $state("")
|
||||
</script>
|
||||
|
||||
<slot></slot>
|
||||
{@render children?.()}
|
||||
|
||||
<h1>{$nav.base.name}</h1>
|
||||
|
||||
@@ -93,7 +96,7 @@ let magnet = ""
|
||||
Torrent file could not be parsed. It may be corrupted.
|
||||
</p>
|
||||
{/if}
|
||||
<button on:click={() => {dispatch("download")}} class="button">
|
||||
<button onclick={() => {dispatch("download")}} class="button">
|
||||
<i class="icon">download</i>
|
||||
<span>Download torrent file</span>
|
||||
</button>
|
||||
|
Reference in New Issue
Block a user