feat(admin-web): surface monitoring platform authorization status

Dashboard and question-detail views now read platform_authorization_status
from the API. Tracking disables collect-now when the account has no
desktop client, no authorized platforms, or the selected platform is
unauthorized, and keeps the six-platform matrix stable; question-detail
replaces tabs and cards with an explicit unavailable notice when the
account is not authorized for monitoring. Adds the shared type and
en/zh strings covering each status.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 22:21:01 +08:00
parent c0253c98f9
commit 1b1ab7ee0c
5 changed files with 137 additions and 10 deletions
+9
View File
@@ -1110,8 +1110,16 @@ export interface MonitoringCitedArticle {
citation_rate: number | null;
}
export type MonitoringPlatformAuthorizationStatus =
| "authorized"
| "no_desktop_client"
| "no_authorized_platforms";
export interface MonitoringDashboardRuntime {
current_user_client_online: boolean;
platform_authorization_status: MonitoringPlatformAuthorizationStatus;
authorized_monitoring_platform_ids: string[];
authorized_monitoring_platform_count: number;
}
export interface MonitoringDashboardCompositeResponse {
@@ -1174,6 +1182,7 @@ export interface MonitoringQuestionDetailResponse {
question_id: number;
question_hash: string;
question_text: string;
platform_authorization_status: MonitoringPlatformAuthorizationStatus;
time_window: {
date_from: string;
date_to: string;