mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 19:20:49 +08:00
fix(quota): allow refresh without creds
This commit is contained in:
@@ -179,6 +179,7 @@ export function QuotaSection<TState extends QuotaStatusState, TData>({
|
|||||||
pendingQuotaRefreshRef.current = false;
|
pendingQuotaRefreshRef.current = false;
|
||||||
const scope = effectiveViewMode === 'all' ? 'all' : 'page';
|
const scope = effectiveViewMode === 'all' ? 'all' : 'page';
|
||||||
const targets = effectiveViewMode === 'all' ? filteredFiles : pageItems;
|
const targets = effectiveViewMode === 'all' ? filteredFiles : pageItems;
|
||||||
|
if (targets.length === 0) return;
|
||||||
loadQuota(targets, scope, setLoading);
|
loadQuota(targets, scope, setLoading);
|
||||||
}, [loading, effectiveViewMode, filteredFiles, pageItems, loadQuota, setLoading]);
|
}, [loading, effectiveViewMode, filteredFiles, pageItems, loadQuota, setLoading]);
|
||||||
|
|
||||||
@@ -244,7 +245,7 @@ export function QuotaSection<TState extends QuotaStatusState, TData>({
|
|||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={handleRefresh}
|
onClick={handleRefresh}
|
||||||
disabled={disabled || isRefreshing || filteredFiles.length === 0}
|
disabled={disabled || isRefreshing}
|
||||||
loading={isRefreshing}
|
loading={isRefreshing}
|
||||||
title={t('quota_management.refresh_files_and_quota')}
|
title={t('quota_management.refresh_files_and_quota')}
|
||||||
aria-label={t('quota_management.refresh_files_and_quota')}
|
aria-label={t('quota_management.refresh_files_and_quota')}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@
|
|||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #0284c7; // sky-600
|
color: var(--count-badge-text);
|
||||||
background-color: #e0f2fe; // sky-100
|
background-color: var(--count-badge-bg);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
--failure-badge-text: #991b1b;
|
--failure-badge-text: #991b1b;
|
||||||
--failure-badge-border: #fca5a5;
|
--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: 0 1px 3px 0 rgb(0 0 0 / 0.1);
|
||||||
--shadow-lg: 0 10px 15px -3px 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-text: #fca5a5;
|
||||||
--failure-badge-border: #dc2626;
|
--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: 0 1px 3px 0 rgb(0 0 0 / 0.3);
|
||||||
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
|
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user