fix: add account mobile hints

This commit is contained in:
cita
2026-03-10 15:35:13 +08:00
parent b23c5ece83
commit b8ebf98b68
2 changed files with 17 additions and 0 deletions
+7
View File
@@ -1322,6 +1322,9 @@ export default function Accounts() {
const connectionMode = resolveAccountCredentialMode(a);
const health = resolveRuntimeHealth(a);
const isExpanded = expandedAccountIds.includes(a.id);
const hintMessage = (a.status === 'expired' && !capabilities.proxyOnly)
? '账号已过期,请重新绑定'
: (health.reason || '-');
return (
<MobileCard
key={a.id}
@@ -1432,6 +1435,10 @@ export default function Accounts() {
label="账号状态"
value={a.status === 'expired' ? '已过期' : (a.status || '-')}
/>
<MobileField
label="提示"
value={hintMessage}
/>
</div>
) : null}
<div className="mobile-card-actions">
+10
View File
@@ -0,0 +1,10 @@
import { describe, expect, it } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
describe('Accounts mobile layout', () => {
it('includes hints field in mobile expanded section', () => {
const source = readFileSync(resolve(process.cwd(), 'src/web/pages/Accounts.tsx'), 'utf8');
expect(source).toContain('label="提示"');
});
});