feat(webui): unify the Apps catalog (#6700)
* feat(webui): unify the Apps catalog * fix(webui): serve all channel branding locally * fix(webui): refine Apps navigation and sidebar
This commit is contained in:
1 parent
5997a714f2
commit
2b232c9133
89 files changed
+1576
-1024
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import { SettingsView } from "@/components/settings/SettingsView";
|
||||
import { StartupSkeleton } from "@/components/StartupSkeleton";
|
||||
import "@/components/startup-skeleton.css";
|
||||
import { settings } from "@/dev/gallery/settings";
|
||||
|
||||
export function installToolsCatalogPreviewApi() {
|
||||
@@ -12,14 +14,20 @@ export function installToolsCatalogPreviewApi() {
|
||||
|
||||
export function ToolsCatalogFixture() {
|
||||
const [open, setOpen] = useState(true);
|
||||
return <main>
|
||||
<button onClick={() => setOpen(value => !value)}>{open ? "Leave settings" : "Open settings"}</button>
|
||||
const params = new URLSearchParams(location.search);
|
||||
const requested = params.get("section");
|
||||
const section = requested === "skills" || requested === "channels" || requested === "automations" ? requested : "apps";
|
||||
if (params.has("startup")) return <StartupSkeleton embedded surface={section} sidebarExpanded={false} />;
|
||||
return <main className={params.has("layout") ? "h-dvh" : undefined}>
|
||||
{!params.has("layout") && <button onClick={() => setOpen(value => !value)}>{open ? "Leave settings" : "Open settings"}</button>}
|
||||
{open && <SettingsView
|
||||
initialSection="apps"
|
||||
initialSection={section}
|
||||
initialSettings={settings}
|
||||
showSidebar={false}
|
||||
themePreference="light"
|
||||
onChangeTheme={() => {}}
|
||||
onModelNameChange={() => {}}
|
||||
onStartAutomationChat={section === "automations" ? () => {} : undefined}
|
||||
onBackToChat={() => setOpen(false)}
|
||||
/>}
|
||||
</main>;
|
||||
|
||||
Reference in new issue
Block a user