refactor(webui): separate presentation views and expand component gallery (#6179)

* refactor(webui): organize shared components with an internal gallery

* refactor(webui): decouple views and expand component gallery

* fix(docker): include channel sources in WebUI build

* refactor(webui): cover all channel interfaces in gallery

* docs(webui): remove manual paragraph wrapping
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-14 00:11:00 +08:00
1 parent db804ef94a
commit 30e43aec82
109 files changed
+7874 -3459

No files matched your search

+1 -7
View File
@@ -1,8 +1,6 @@
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import { useClient } from "@/providers/ClientProvider";
import type { ConnectionStatus } from "@/lib/types";
const COPY: Record<ConnectionStatus, { color: string }> = {
@@ -24,12 +22,8 @@ const COPY: Record<ConnectionStatus, { color: string }> = {
},
};
export function ConnectionBadge() {
export function ConnectionBadge({ status }: { status: ConnectionStatus }) {
const { t } = useTranslation();
const { client } = useClient();
const [status, setStatus] = useState<ConnectionStatus>(client.status);
useEffect(() => client.onStatus(setStatus), [client]);
const meta = COPY[status];
const pulsing =