diff --git a/apps/roam/src/components/settings/AdminPanel.tsx b/apps/roam/src/components/settings/AdminPanel.tsx index 924b37806..201c35f6e 100644 --- a/apps/roam/src/components/settings/AdminPanel.tsx +++ b/apps/roam/src/components/settings/AdminPanel.tsx @@ -1,6 +1,18 @@ import React, { useState, useEffect } from "react"; -import { HTMLTable, Button, MenuItem, Spinner, Label } from "@blueprintjs/core"; +import { + Button, + Checkbox, + HTMLTable, + Label, + MenuItem, + Spinner, + Tab, + TabId, + Tabs, +} from "@blueprintjs/core"; +import Description from "roamjs-components/components/Description"; import { Select } from "@blueprintjs/select"; +import { getSetting, setSetting } from "~/utils/extensionSettings"; import { getSupabaseContext, getLoggedInClient, @@ -91,7 +103,7 @@ const NodeTable = ({ nodes }: { nodes: PConceptFull[] }) => { ); }; -const AdminPanel = () => { +const AdminPanel = (): React.ReactElement => { const [context, setContext] = useState(null); const [supabase, setSupabase] = useState(null); const [schemas, setSchemas] = useState([]); @@ -101,6 +113,10 @@ const AdminPanel = () => { const [loading, setLoading] = useState(true); const [loadingNodes, setLoadingNodes] = useState(true); const [error, setError] = useState(null); + const [selectedTabId, setSelectedTabId] = useState("admin"); + const [useReifiedRelations, setUseReifiedRelations] = useState( + getSetting("use-reified-relations"), + ); useEffect(() => { let ignore = false; @@ -196,41 +212,83 @@ const AdminPanel = () => { } return ( - <> -

- Context:{" "} - {JSON.stringify({ ...context, spacePassword: "****" })} -

- {schemas.length > 0 ? ( - <> - -
{loadingNodes ? : }
- - ) : ( -

No node schemas found

- )} - + + } + /> + + } + /> + +

+ Context:{" "} + + {JSON.stringify({ ...context, spacePassword: "****" })} + +

+ {schemas.length > 0 ? ( + <> + +
+ {loadingNodes ? : } +
+ + ) : ( +

No node schemas found

+ )} + + } + /> + ); }; diff --git a/apps/roam/src/components/settings/Settings.tsx b/apps/roam/src/components/settings/Settings.tsx index 08c31aff5..a46101685 100644 --- a/apps/roam/src/components/settings/Settings.tsx +++ b/apps/roam/src/components/settings/Settings.tsx @@ -78,7 +78,6 @@ export const SettingsDialog = ({ selectedTabId ?? "discourse-graph-home-personal", ); - useEffect(() => { const handleKeyPress = (e: KeyboardEvent) => { if (e.ctrlKey && e.shiftKey && e.key === "A") {