Fix large file download

This commit is contained in:
Schluffe committed 2026-10-22 22:57:41 +02:00
1 parent aea75fff92
commit ff7b84af02
4 files changed
+403 -146

No files matched your search

-4
View File
@@ -24,12 +24,10 @@ const receiveCode = ref('');
const check = ref<Check>();
const confirmSend = ref<() => void>();
const download = ref<{ name: string; url: string }>();
const log = ref<string[]>([]);
const events: Events = {
log: (message) => log.value.push(`${new Date().toISOString().slice(11, 23)} ${message}`),
file: (name, url) => (download.value = { name, url }),
check: (result, confirm) => {
check.value = result;
confirmSend.value = confirm;
@@ -116,8 +114,6 @@ function onReceive() {
<button v-if="confirmSend" id="confirm" @click="onConfirm">Codes match, send</button>
</p>
<p v-if="download"><a id="download" :href="download.url" :download="download.name">{{ download.name }}</a></p>
<h2>Log</h2>
<pre id="log">{{ log.join('\n') }}</pre>
</main>