fix: 修复远程浏览器登录态保留 & 剪贴板同步问题

This commit is contained in:
liumangmang
2026-05-20 10:13:13 +08:00
parent 6cc797f915
commit 0a27bba296
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -72,8 +72,9 @@ def _check_upstream(upstream_id: int) -> None:
balance = raw_balance / divisor
except Exception as exc:
logger.warning("upstream %s balance fetch failed: %s", upstream.name, exc)
upstream.balance = balance
upstream.balance_updated_at = datetime.now(timezone.utc) if balance is not None else None
if balance is not None:
upstream.balance = balance
upstream.balance_updated_at = datetime.now(timezone.utc)
except Exception as exc:
# failure path
upstream.consecutive_failures = (upstream.consecutive_failures or 0) + 1
+2
View File
@@ -551,6 +551,7 @@ function handlePlatformChange(val: string) {
form.value.auth_config.username_field = 'email'
form.value.balance_endpoint = '/auth/me'
form.value.balance_response_path = 'data.balance'
form.value.balance_divisor = 1.0
} else if (val === 'new-api') {
form.value.api_prefix = ''
form.value.groups_endpoint = '/api/group/'
@@ -572,6 +573,7 @@ function handlePlatformChange(val: string) {
} else {
form.value.balance_endpoint = ''
form.value.balance_response_path = ''
form.value.balance_divisor = 1.0
}
}