From 4495c02c41b95ce6df0c34dbf6ac62f7addae7a3 Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Sun, 10 Mar 2024 01:01:22 +0000
Subject: Move selected state out of store and into route

---
 layouts/editor.vue | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 layouts/editor.vue

(limited to 'layouts/editor.vue')

diff --git a/layouts/editor.vue b/layouts/editor.vue
new file mode 100644
index 0000000..873e55c
--- /dev/null
+++ b/layouts/editor.vue
@@ -0,0 +1,43 @@
+<script setup lang="ts">
+import { useSessionStore } from '@/stores/session';
+import { loadQuestsFromJson, loadCategoriesFromJson } from '@/lib/questsLoader';
+import SiteHeader from '@/components/Header/SiteHeader.vue';
+import EditorSidebar from '@/components/Editor/EditorSidebar.vue';
+import testData from '@/data/testData.json';
+import taskDefinitions from '@/data/taskDefinitions.json';
+
+const sessionStore = useSessionStore();
+
+const quests = loadQuestsFromJson(testData.quests);
+const categories = loadCategoriesFromJson(testData.categories);
+
+sessionStore.setQuests(quests);
+sessionStore.setCategories(categories);
+sessionStore.setTaskDefinitions(taskDefinitions.taskTypes);
+// sessionStore.updateEditorCategories();
+</script>
+
+<template>
+  <SiteHeader />
+
+  <div id="editor-container">
+    <EditorSidebar />
+
+    <div id="editor-pane">
+      <slot />
+    </div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+#editor-container {
+  display: flex;
+  background-color: var(--color-background-soft);
+  max-height: calc(100vh - 73px);
+  flex-direction: row;
+}
+
+#editor-pane {
+  width: 100%;
+}
+</style>
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

