Convert multiple pages into SPA
This commit is contained in:
@@ -19,9 +19,10 @@ import { formatDate } from "util/Formatting"
|
||||
import TorrentItem from "./TorrentItem.svelte"
|
||||
import IconBlock from "layout/IconBlock.svelte";
|
||||
import TextBlock from "layout/TextBlock.svelte"
|
||||
import { fs_node_icon, fs_path_url } from "filesystem/FilesystemAPI";
|
||||
import { fs_node_icon, fs_path_url } from "lib/FilesystemAPI";
|
||||
import CopyButton from "layout/CopyButton.svelte";
|
||||
import type { FSNavigator } from "filesystem/FSNavigator";
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
@@ -31,7 +32,7 @@ let status = "loading"
|
||||
|
||||
export const update = async () => {
|
||||
try {
|
||||
nav.set_loading(true)
|
||||
loading_start()
|
||||
let resp = await fetch(fs_path_url(nav.base.path)+"?torrent_info")
|
||||
|
||||
if (resp.status >= 400) {
|
||||
@@ -58,7 +59,7 @@ export const update = async () => {
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
} finally {
|
||||
nav.set_loading(false)
|
||||
loading_finish()
|
||||
status = "finished"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user