perf(desktop): lazy-load renderer routes and pause polling when hidden

Drop the eager Antd global import in favour of unplugin-vue-components
on-demand resolution, async route components, defineAsyncComponent for
the shell/login split, and a dynamic Modal import inside
showClientActionError. Pair that with a visibility-aware runtime poller
that stops the 15s snapshot refresh when the window is hidden and kicks
off an immediate refresh on re-show. Refresh DesktopShell nav with
inline icons and a calmer active/hover treatment, and land
ActionButton/DisclosurePanel/PaginationBar primitives for upcoming
views.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-20 11:08:09 +08:00
parent ef868f81a1
commit 73dfbbe8b5
12 changed files with 579 additions and 53 deletions
@@ -1,5 +1,3 @@
import { Modal } from "ant-design-vue";
type ClientErrorTone = "error" | "warning";
type ClientActionKind = "bind-account" | "open-console" | "unbind-account";
@@ -119,8 +117,9 @@ function presentClientError(kind: ClientActionKind, error: unknown): ClientError
};
}
export function showClientActionError(kind: ClientActionKind, error: unknown): void {
export async function showClientActionError(kind: ClientActionKind, error: unknown): Promise<void> {
const presentation = presentClientError(kind, error);
const { Modal } = await import("ant-design-vue");
const showModal = presentation.tone === "warning" ? Modal.warning : Modal.error;
showModal({