Remove some event dispatchers

This commit is contained in:
Pixeldrain-Server committed 2025-10-14 00:03:48 +02:00
1 parent 75d9ed3023
commit b409ff009d
23 files changed
+165 -316

No files matched your search

@@ -172,7 +172,7 @@ const leave_confirmation = (e: BeforeUnloadEvent) => {
<div class="body">
{#each upload_queue as job}
{#if job.status !== "finished"}
<UploadProgress bind:this={job.component} job={job} on:finished={finish_upload}/>
<UploadProgress bind:this={job.component} job={job} finish={finish_upload}/>
{/if}
{/each}
</div>
@@ -1,20 +1,19 @@
<script lang="ts">
import { createEventDispatcher } from "svelte";
import { upload_file } from "./UploadFunc";
import ProgressBar from "util/ProgressBar.svelte";
import Button from "layout/Button.svelte"
import type { UploadJob } from "./FSUploadWidget.svelte";
let dispatch = createEventDispatcher()
let {
job = $bindable(),
total = $bindable(0),
loaded = $bindable(0)
loaded = $bindable(0),
finish,
}: {
job: UploadJob;
total?: number;
loaded?: number;
job: UploadJob
total?: number
loaded?: number
finish: () => void
} = $props();
let error_code = $state("")
@@ -31,7 +30,7 @@ export const start = () => {
},
async () => {
job.status = "finished"
dispatch("finished")
finish()
},
(code, message) => {
if (job.status === "finished") {
@@ -59,7 +58,7 @@ const cancel = () => {
}
xhr = null
dispatch("finished")
finish()
}
</script>