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:
1 parent
db804ef94a
commit
30e43aec82
109 files changed
+7874
-3459
No files matched your search
@@ -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 =
|
||||
|
||||
Reference in new issue
Block a user