Quota and better drive dashboard

This commit is contained in:
2025-07-27 18:08:39 +08:00
parent 4a0117906a
commit c875c82bdc
16 changed files with 758 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
<template>
<section class="h-full relative flex items-center justify-center">
<n-card class="max-w-lg" title="About" v-if="!userStore.user">
<n-card class="max-w-lg my-4 mx-8" title="About" v-if="!userStore.user">
<p>Welcome to the <b>Solar Drive</b></p>
<p>We help you upload, collect, and share files with ease in mind.</p>
<p>To continue, login first.</p>
@@ -22,6 +22,13 @@
</div>
</template>
<n-collapse-transition :show="showRecycleHint">
<n-alert size="small" type="warning" title="Recycle Enabled" class="mb-3">
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.
</n-alert>
</n-collapse-transition>
<div class="mb-3">
<file-pool-select v-model="filePool" @update:pool="currentFilePool = $event" />
</div>
@@ -107,6 +114,7 @@ import {
NSwitch,
NCollapseTransition,
NDatePicker,
NAlert,
type UploadCustomRequestOptions,
type UploadSettledFileInfo,
type UploadFileInfo,
@@ -149,6 +157,10 @@ const currentFilePool = computed(() => {
if (!filePool.value) return null
return pools.value?.find((pool) => pool.id === filePool.value) ?? null
})
const showRecycleHint = computed(() => {
if (!filePool.value) return true
return currentFilePool.value.policy_config?.enable_recycle || false
})
const messageDisplay = useMessage()