finish database, udp pool

This commit is contained in:
2025-03-22 21:50:56 +08:00
parent 53eeac5272
commit 12caccd2ca
11 changed files with 395 additions and 5 deletions

View File

@@ -23,6 +23,7 @@
<script lang="ts" setup>
import { client } from '@/client';
import { TRPCClientError } from '@trpc/client';
var bitstream = null;
@@ -41,9 +42,20 @@ function handleFileChange(event: Event): void {
}
async function uploadBitStream() {
const serverStatus = await client.api.status.query();
try {
const serverStatus = await client.api.status.query();
if (serverStatus != "OK") {
throw new Error("Server Busy...")
}
} catch (error) {
if (error instanceof TRPCClientError) {
console.error("Can't connect to Server!")
} else {
console.error(error)
}
}
console.log(serverStatus)
}
function checkFileType(file: File) {