From 68f7a0e9ce376a8ddcd3f581056893cbdfeab89b Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sat, 18 Oct 2025 00:45:59 -0700 Subject: [PATCH] all info menu to top of settings --- frontend/src/pages/settings/core-info.tsx | 71 +++++++++++++++++++++++ frontend/src/pages/settings/index.tsx | 22 +------ 2 files changed, 74 insertions(+), 19 deletions(-) create mode 100644 frontend/src/pages/settings/core-info.tsx diff --git a/frontend/src/pages/settings/core-info.tsx b/frontend/src/pages/settings/core-info.tsx new file mode 100644 index 000000000..b2ddd8176 --- /dev/null +++ b/frontend/src/pages/settings/core-info.tsx @@ -0,0 +1,71 @@ +import { MonacoEditor } from "@components/monaco"; +import { CopyButton } from "@components/util"; +import { useRead } from "@lib/hooks"; +import { Button } from "@ui/button"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@ui/dialog"; +import { Input } from "@ui/input"; +import { Info, Loader2 } from "lucide-react"; +import { useState } from "react"; + +export const CoreInfo = () => { + const info = useRead("GetCoreInfo", {}).data; + return ( +
+
+ {info?.title} +
+ | +
+ Public Key + + +
+ | + +
+ ); +}; + +const AllInfo = () => { + const [open, setOpen] = useState(false); + const info = useRead("GetCoreInfo", {}).data; + return ( + + + + + + + Core Info + + {info ? ( + + ) : ( +
+ +
+ )} +
+
+ ); +}; diff --git a/frontend/src/pages/settings/index.tsx b/frontend/src/pages/settings/index.tsx index 4411561bd..543af8b70 100644 --- a/frontend/src/pages/settings/index.tsx +++ b/frontend/src/pages/settings/index.tsx @@ -1,5 +1,5 @@ import { lazy } from "react"; -import { useRead, useSettingsView, useUser } from "@lib/hooks"; +import { useSettingsView, useUser } from "@lib/hooks"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@ui/tabs"; import { Page } from "@components/layouts"; import { ExportButton } from "@components/export"; @@ -9,15 +9,13 @@ import { UsersPage } from "./users"; import { Profile } from "./profile"; import { ProvidersPage } from "./providers"; import { Onboarding } from "./onboarding"; -import { Input } from "@ui/input"; -import { CopyButton } from "@components/util"; +import { CoreInfo } from "./core-info"; const Resources = lazy(() => import("@pages/resources")); export default function Settings() { const user = useUser().data; const [view, setView] = useSettingsView(); - const info = useRead("GetCoreInfo", {}).data; const currentView = (view === "Users" || view === "Providers") && !user?.admin ? "Variables" @@ -25,21 +23,7 @@ export default function Settings() { return (
-
-
- {info?.title} -
- | -
- Public Key - - -
-
+