Ver código fonte

fix(mobile): remove account refresh status strip for both roles

彭峰 6 dias atrás
pai
commit
0b4e3ae8a8

+ 3 - 3
projects/xiaoshu-mobile/src/app/core/home-learning-modules.integration.spec.ts

@@ -406,9 +406,9 @@ describe('home learning modules', () => {
       harness.fixture.detectChanges();
       expect(count('app_account_overview')).toBe(before.account);
       expect(harness.routeNativeElement?.textContent).not.toContain('正在同步...');
-      (harness.routeNativeElement?.querySelector('.account-refresh') as HTMLButtonElement).click();
-      harness.fixture.detectChanges();
-      expect(count('app_account_overview')).toBe(before.account + 1);
+      expect(harness.routeNativeElement?.querySelector('.account-live-status')).toBeNull();
+      expect(harness.routeNativeElement?.querySelector('.account-refresh')).toBeNull();
+      expect(count('app_account_overview')).toBe(before.account);
       expect(count('app_live_versions')).toBe(before.versions);
     });
   }

+ 0 - 2
projects/xiaoshu-mobile/src/app/features/home/account-page.component.html

@@ -4,8 +4,6 @@
   @if (session.isLoggedIn()) { <a routerLink="/pages/member/settings" aria-label="个人设置" title="个人设置"><lucide-icon [img]="icons.Settings" [size]="21" /></a> } @else { <a class="login-link" routerLink="/pages/member/wxauth">前去登录<lucide-icon [img]="icons.ChevronRight" [size]="17" /></a> }
 </header>
 
-@if (session.isLoggedIn()) { <div class="account-live-status" [class.delayed]="liveSyncStatus().state !== 'current'" role="status"><lucide-icon [class.spin]="liveChecking()" [img]="icons.LoaderCircle" [size]="14" /><span>{{ liveStatusText() }}</span><button class="account-refresh" type="button" (click)="retryOverview()" [disabled]="coachPanelLoading() || companionLoading() || antiForgetLoading()" aria-label="刷新我的数据"><lucide-icon [img]="icons.RefreshCw" [size]="16" [class.spin]="coachPanelLoading() || companionLoading() || antiForgetLoading()" />刷新</button></div> }
-
 @if (session.isLoggedIn()) {
   @if (overviewError()) { <section class="account-state error" role="alert"><lucide-icon [img]="icons.RefreshCw" [size]="22" /><span>{{ overviewError() }}</span><button type="button" (click)="retryOverview()">重新加载</button></section> }
   <section class="membership-card" aria-label="账号与学习权益">

+ 0 - 4
projects/xiaoshu-mobile/src/app/features/home/account-page.component.scss

@@ -7,10 +7,6 @@
 .profile-copy span { font-size: 12px; opacity: .8; }
 .profile-header > a { display: flex; align-items: center; color: white; text-decoration: none; gap: 2px; }
 .login-link { font-size: 13px; }
-.account-live-status { display: flex; min-height: 28px; align-items: center; justify-content: center; margin: 6px 14px -4px; color: var(--ink-soft); font-size: 10px; gap: 5px; }
-.account-refresh { display: inline-flex; min-height: 36px; align-items: center; gap: 4px; margin-left: 8px; padding: 0 10px; color: var(--brand-deep); background: transparent; border: 0; font: inherit; cursor: pointer; }
-.account-refresh:disabled { opacity: .6; cursor: wait; }
-.account-live-status.delayed { color: #8d570b; }
 .spin { animation: spin .8s linear infinite; }
 @keyframes spin { to { transform: rotate(360deg); } }
 .account-state { display: flex; min-height: 64px; align-items: center; margin: 12px 14px 0; padding: 11px 14px; background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); gap: 9px; }