Move some libraries around

This commit is contained in:
2024-09-12 15:11:50 +02:00
parent f3ac6875ed
commit 9e7f3b4e0d
18 changed files with 16 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
<script>
import { formatDataVolume, formatThousands } from "../util/Formatting.svelte"
import { set_file, stats } from "../util/StatsSocket"
import { set_file, stats } from "../lib/StatsSocket.js"
export let file = {
id: "",

View File

@@ -1,6 +1,6 @@
<script>
import { formatDataVolume } from "../util/Formatting.svelte";
import { stats } from "../util/StatsSocket.js"
import { stats } from "../lib/StatsSocket.js"
let percent = 0
let title = ""

View File

@@ -2,7 +2,7 @@
import { formatDataVolume } from "../../util/Formatting.svelte";
import TextBlock from "../../layout/TextBlock.svelte"
import ProgressBar from "../../util/ProgressBar.svelte";
import { stats } from "../../util/StatsSocket.js"
import { stats } from "../../lib/StatsSocket.js"
export let file = {
size: 0,

View File

@@ -11,7 +11,7 @@ import Abuse from "./Abuse.svelte";
import { file_type } from "../FileUtilities.svelte";
import RateLimit from "./RateLimit.svelte";
import Torrent from "./Torrent.svelte";
import { stats } from "../../util/StatsSocket.js"
import { stats } from "../../lib/StatsSocket.js"
import Zip from "./Zip.svelte";
import SlowDown from "../../layout/SlowDown.svelte";

View File

@@ -1,6 +1,6 @@
<script>
import { createEventDispatcher } from "svelte"
import { swipe_nav } from "../../util/SwipeNavigate.ts";
import { swipe_nav } from "../../lib/SwipeNavigate.ts";
let dispatch = createEventDispatcher()
export const set_file = f => {

View File

@@ -1,7 +1,7 @@
<script>
import { createEventDispatcher } from "svelte";
import { formatDataVolume } from "../../util/Formatting.svelte";
import { stats } from "../../util/StatsSocket.js"
import { stats } from "../../lib/StatsSocket.js"
import IconBlock from "../../layout/IconBlock.svelte";
import TextBlock from "../../layout/TextBlock.svelte"
let dispatch = createEventDispatcher()

View File

@@ -13,7 +13,7 @@ import Menu from './Menu.svelte';
import { FSNavigator } from "./FSNavigator"
import { writable } from 'svelte/store';
import TransferLimit from '../file_viewer/TransferLimit.svelte';
import { stats } from "../util/StatsSocket.js"
import { stats } from "../lib/StatsSocket.js"
import { css_from_path } from './edit_window/Branding';
let file_viewer

View File

@@ -98,7 +98,6 @@ export const fs_mkdirall = async (path: string, opts: NodeOptions) => {
)
}
export const fs_get_node = async (path: string) => {
return await fs_check_response(
await fetch(fs_path_url(path) + "?stat")
@@ -144,6 +143,7 @@ export const fs_delete = async (path: string) => {
await fetch(fs_path_url(path), { method: "DELETE" })
) as GenericResponse
}
export const fs_delete_all = async (path: string) => {
return await fs_check_response(
await fetch(fs_path_url(path) + "?recursive", { method: "DELETE" })

View File

@@ -7,7 +7,7 @@ import GalleryView from './GalleryView.svelte'
import Button from '../../layout/Button.svelte';
import FileImporter from './FileImporter.svelte';
import { formatDate } from '../../util/Formatting.svelte';
import { drop_target } from "../../util/DropTarget.ts"
import { drop_target } from "../../lib/DropTarget.ts"
export let nav
export let upload_widget

View File

@@ -12,7 +12,7 @@ import Video from "./Video.svelte";
import Torrent from "./Torrent.svelte";
import Zip from "./Zip.svelte";
import CustomBanner from "./CustomBanner.svelte";
import { stats } from "../../util/StatsSocket.js"
import { stats } from "../../lib/StatsSocket.js"
import SlowDown from "../../layout/SlowDown.svelte";
export let nav

View File

@@ -1,7 +1,7 @@
<script>
import { createEventDispatcher } from "svelte";
import { swipe_nav } from "../../util/SwipeNavigate.ts";
import { fs_path_url } from "./../FilesystemAPI";
import { swipe_nav } from "../../lib/SwipeNavigate.ts";
import { fs_path_url } from "./../FilesystemAPI.ts";
let dispatch = createEventDispatcher();

View File

@@ -2,7 +2,7 @@
import Login from "../login/Login.svelte";
import Register from "../login/Register.svelte";
import UploadWidget from "./UploadWidget.svelte";
import { drop_target } from "../util/DropTarget.ts"
import { drop_target } from "../lib/DropTarget.ts"
const finish_login = async e => {
location.reload()

View File

@@ -1,7 +1,7 @@
<script>
import { createEventDispatcher } from "svelte";
import { formatDataVolume, formatDuration } from "../util/Formatting.svelte";
import { stats } from "../util/StatsSocket.js"
import { stats } from "../lib/StatsSocket.js"
import TextBlock from "./TextBlock.svelte"
import IconBlock from "./IconBlock.svelte";
let dispatch = createEventDispatcher()

View File

@@ -5,7 +5,7 @@ import { fs_encode_path, fs_node_icon } from "../../filesystem/FilesystemAPI.ts"
import Button from "../../layout/Button.svelte";
import CreateDirectory from "../../filesystem/filemanager/CreateDirectory.svelte";
import FSUploadWidget from "../../filesystem/upload_widget/FSUploadWidget.svelte";
import { drop_target } from "../../util/DropTarget.ts"
import { drop_target } from "../../lib/DropTarget.ts"
const nav = new FSNavigator(false)
let upload_widget

View File

@@ -1,6 +1,6 @@
<script>
import UploadLib from "./UploadLib.svelte";
import { drop_target } from "../../util/DropTarget.ts"
import { drop_target } from "../../lib/DropTarget.ts"
let upload_widget
</script>