fix(quota): allow refresh without creds

This commit is contained in:
moxi
2026-01-04 18:48:27 +08:00
parent e914337e57
commit 692f7f3cde
3 changed files with 10 additions and 3 deletions

View File

@@ -179,6 +179,7 @@ export function QuotaSection<TState extends QuotaStatusState, TData>({
pendingQuotaRefreshRef.current = false;
const scope = effectiveViewMode === 'all' ? 'all' : 'page';
const targets = effectiveViewMode === 'all' ? filteredFiles : pageItems;
if (targets.length === 0) return;
loadQuota(targets, scope, setLoading);
}, [loading, effectiveViewMode, filteredFiles, pageItems, loadQuota, setLoading]);
@@ -244,7 +245,7 @@ export function QuotaSection<TState extends QuotaStatusState, TData>({
variant="secondary"
size="sm"
onClick={handleRefresh}
disabled={disabled || isRefreshing || filteredFiles.length === 0}
disabled={disabled || isRefreshing}
loading={isRefreshing}
title={t('quota_management.refresh_files_and_quota')}
aria-label={t('quota_management.refresh_files_and_quota')}

View File

@@ -57,8 +57,8 @@
border-radius: 999px;
font-size: 13px;
font-weight: 600;
color: #0284c7; // sky-600
background-color: #e0f2fe; // sky-100
color: var(--count-badge-text);
background-color: var(--count-badge-bg);
box-sizing: border-box;
}

View File

@@ -32,6 +32,9 @@
--failure-badge-text: #991b1b;
--failure-badge-border: #fca5a5;
--count-badge-bg: rgba(59, 130, 246, 0.14);
--count-badge-text: var(--primary-active);
--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
@@ -66,6 +69,9 @@
--failure-badge-text: #fca5a5;
--failure-badge-border: #dc2626;
--count-badge-bg: rgba(59, 130, 246, 0.25);
--count-badge-text: var(--primary-active);
--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}