diff --git a/pkgs/webview-ui/app/src/Routes.tsx b/pkgs/webview-ui/app/src/Routes.tsx index d0c8a27b2..51f0c01d6 100644 --- a/pkgs/webview-ui/app/src/Routes.tsx +++ b/pkgs/webview-ui/app/src/Routes.tsx @@ -7,6 +7,7 @@ import { BlockDevicesView } from "./routes/blockdevices/view"; import { Flash } from "./routes/flash/view"; import { Settings } from "./routes/settings"; import { Welcome } from "./routes/welcome"; +import { Deploy } from "./routes/deploy"; export type Route = keyof typeof routes; @@ -51,6 +52,11 @@ export const routes = { label: "welcome", icon: "settings", }, + deploy: { + child: Deploy, + label: "deploy", + icon: "content_copy", + }, }; interface RouterProps { diff --git a/pkgs/webview-ui/app/src/layout/header.tsx b/pkgs/webview-ui/app/src/layout/header.tsx index badb57a34..bc9234d75 100644 --- a/pkgs/webview-ui/app/src/layout/header.tsx +++ b/pkgs/webview-ui/app/src/layout/header.tsx @@ -1,6 +1,21 @@ +import { createQuery } from "@tanstack/solid-query"; import { activeURI, setRoute } from "../App"; +import { callApi } from "../api"; +import { Show } from "solid-js"; export const Header = () => { + const { isLoading, data } = createQuery(() => ({ + queryKey: [`${activeURI()}:meta`], + queryFn: async () => { + const currUri = activeURI(); + if (currUri) { + const result = await callApi("show_clan_meta", { uri: currUri }); + if (result.status === "error") throw new Error("Failed to fetch data"); + return result.data; + } + }, + })); + return (