From 6ef1533abf799ec2501fc741d126d2dbcb6890a6 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 28 Jul 2025 01:08:33 +0800 Subject: [PATCH] :rotating_light: Bug fix drive frontend --- .../Client/src/components/UploadArea.vue | 13 +++++++++---- DysonNetwork.Drive/Client/src/types/pool.ts | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/DysonNetwork.Drive/Client/src/components/UploadArea.vue b/DysonNetwork.Drive/Client/src/components/UploadArea.vue index 364820e..1520687 100644 --- a/DysonNetwork.Drive/Client/src/components/UploadArea.vue +++ b/DysonNetwork.Drive/Client/src/components/UploadArea.vue @@ -2,8 +2,8 @@
- You're uploading to a pool which enabled recycle. If the file you uploaded didn't - referenced from the Solar Network. It will be marked and will be deleted some while later. + You're uploading to a pool which enabled recycle. If the file you uploaded didn't referenced + from the Solar Network. It will be marked and will be deleted some while later. @@ -89,7 +89,12 @@ import type { SnFilePool } from '@/types/pool' import * as tus from 'tus-js-client' -const props = defineProps<{ filePool: string | null; modeAdvanced: boolean; pools: SnFilePool[]; bundleId?: string }>() +const props = defineProps<{ + filePool: string | null + modeAdvanced: boolean + pools: SnFilePool[] + bundleId?: string +}>() const filePass = ref('') const fileExpire = ref(null) @@ -100,7 +105,7 @@ const currentFilePool = computed(() => { }) const showRecycleHint = computed(() => { if (!props.filePool) return true - return currentFilePool.value.policy_config?.enable_recycle || false + return currentFilePool.value?.policy_config?.enable_recycle || false }) const messageDisplay = useMessage() diff --git a/DysonNetwork.Drive/Client/src/types/pool.ts b/DysonNetwork.Drive/Client/src/types/pool.ts index df0f55b..cfcca76 100644 --- a/DysonNetwork.Drive/Client/src/types/pool.ts +++ b/DysonNetwork.Drive/Client/src/types/pool.ts @@ -4,6 +4,7 @@ export interface SnFilePool { description: string storage_config: StorageConfig billing_config: BillingConfig + policy_config: any public_indexable: boolean public_usable: boolean no_optimization: boolean