fix(desktop): Tauri 端屏蔽"已恢复连接"离线队列提示
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Tauri 桌面端直连本地 Kernel,不存在浏览器端的离线队列场景, "已恢复连接 + 发送中 N 条"提示对桌面用户无意义且干扰界面。 通过检测 __TAURI_INTERNALS__ 在非离线状态时返回 null, 真正离线时仍正常显示。
This commit is contained in:
@@ -126,6 +126,12 @@ export function OfflineIndicator({
|
||||
return null;
|
||||
}
|
||||
|
||||
// Tauri desktop: suppress "已恢复连接" state — only show real offline
|
||||
const isTauri = !!(window as unknown as { __TAURI_INTERNALS__?: unknown }).__TAURI_INTERNALS__;
|
||||
if (isTauri && !isOffline) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Compact version for headers/toolbars
|
||||
if (compact) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user