aboutsummaryrefslogtreecommitdiffstats
path: root/ui/src/pages
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2024-07-15 19:12:01 +0100
committerGitHub <noreply@github.com>2024-07-15 19:12:01 +0100
commit7eb985b616c12aed261fbef74a47c5a928c03e61 (patch)
treefe3088dc687c640176bf376b4ca8baf2088bd69f /ui/src/pages
parentchore(deps): bump cachix/install-nix-action from 20 to 27 (#2268) (diff)
downloadatuin-7eb985b616c12aed261fbef74a47c5a928c03e61.zip
feat(gui): add runbook list, ability to create and delete, sql storage (#2282)
* wip * saving works :)) * functioning delete button * persist selection properly
Diffstat (limited to 'ui/src/pages')
-rw-r--r--ui/src/pages/Runbooks.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/src/pages/Runbooks.tsx b/ui/src/pages/Runbooks.tsx
index 4237e065..0452a578 100644
--- a/ui/src/pages/Runbooks.tsx
+++ b/ui/src/pages/Runbooks.tsx
@@ -1,9 +1,20 @@
import Editor from "@/components/runbooks/editor/Editor";
+import List from "@/components/runbooks/List";
+import { useStore } from "@/state/store";
export default function Runbooks() {
+ const currentRunbook = useStore((store) => store.currentRunbook);
+
return (
- <div className="w-full flex-1 flex-col p-4">
- <Editor />
+ <div className="w-full flex flex-row ">
+ <List />
+ {currentRunbook && <Editor />}
+
+ {!currentRunbook && (
+ <div className="flex align-middle justify-center flex-col h-screen w-full">
+ <h1 className="text-center">Select or create a runbook</h1>
+ </div>
+ )}
</div>
);
}