Align console behavior with operator routing and image workflow expectations

Constraint: Must preserve current exchange-rate logic, same-group routing boundary, and temporary image-file behavior while fixing UX-visible inconsistencies.
Rejected: Large frontend chunk refactor | introduced risky circular chunking and did not improve deliverability for this rollout.
Confidence: medium
Scope-risk: moderate
Directive: Keep channel failover constrained to the selected group and preserve Beijing-day semantics for user cache dashboard metrics.
Tested: go test ./controller ./model ./service ./common -count=1; npm run build; remote smoke on source deployment at http://38.76.218.56:18081/ plus /api/status and /api/image-studio/settings.
Not-tested: Browser-driven end-to-end verification of every console page interaction.
This commit is contained in:
ikmkj
2026-05-05 15:27:51 +08:00
parent 92ee465a41
commit 8ee89478a9
46 changed files with 1341 additions and 289 deletions

View File

@@ -620,7 +620,7 @@ export const useChannelsData = () => {
switch (type) {
case 'priority':
if (data.priority === undefined || data.priority === '') {
showInfo('优先级必须是整数!');
showInfo('同组优先级必须是整数!');
return;
}
data.priority = parseInt(data.priority);
@@ -631,7 +631,7 @@ export const useChannelsData = () => {
data.weight < 0 ||
data.weight === ''
) {
showInfo('权重必须是非负整数!');
showInfo('同优先级顺序必须是非负整数!');
return;
}
data.weight = parseInt(data.weight);

View File

@@ -243,9 +243,11 @@ export const useDashboardData = (userState, userDispatch, statusState) => {
}, [userDispatch]);
const refresh = useCallback(async () => {
const data = await loadQuotaData();
await loadUptimeData();
await loadCacheStats();
const [data] = await Promise.all([
loadQuotaData(),
loadUptimeData(),
loadCacheStats(),
]);
return data;
}, [loadQuotaData, loadUptimeData, loadCacheStats]);

View File

@@ -185,7 +185,7 @@ export const useModelPricingData = () => {
}
if (currency === 'CNY') {
return `¥${(priceInUSD * usdExchangeRate).toFixed(3)}`;
return `${(priceInUSD * usdExchangeRate).toFixed(3)}`;
} else if (currency === 'CUSTOM') {
return `${customCurrencySymbol}${(priceInUSD * customExchangeRate).toFixed(3)}`;
}