From 2aca4247c5d0c7061a300517178dd31316b65fab Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Thu, 15 Feb 2024 14:01:30 +0000
Subject: Initial commit

---
 .../Editor/Quest/QuestTasksOptionsPanel.vue        | 75 ++++++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 src/components/Editor/Quest/QuestTasksOptionsPanel.vue

(limited to 'src/components/Editor/Quest/QuestTasksOptionsPanel.vue')

diff --git a/src/components/Editor/Quest/QuestTasksOptionsPanel.vue b/src/components/Editor/Quest/QuestTasksOptionsPanel.vue
new file mode 100644
index 0000000..12b1263
--- /dev/null
+++ b/src/components/Editor/Quest/QuestTasksOptionsPanel.vue
@@ -0,0 +1,75 @@
+<script setup lang="ts">
+import { useSessionStore, type EditorQuest } from '@/stores/session';
+import { computed } from 'vue';
+import EditorOptionsPanel from '@/components/Editor/EditorOptionsPanel.vue';
+import TaskConfiguration from '@/components/Editor/Quest/Task/TaskConfiguration.vue';
+import Button from '@/components/Control/Button.vue';
+
+const props = defineProps<{
+  questId: string;
+}>();
+
+const sessionStore = useSessionStore();
+
+const quest = computed(() => {
+  return sessionStore.getQuestById(props.questId) as EditorQuest;
+});
+</script>
+
+<template>
+  <EditorOptionsPanel v-if="quest">
+    <div id="options">
+      <h2>Tasks <code>({{ Object.keys(quest.tasks).length }})</code></h2>
+      
+      <TaskConfiguration v-for="(task, taskId) in quest.tasks" :key="taskId" :taskId="String(taskId)" :quest="quest" />
+      
+      <div id="controls">
+        <Button
+          id="add-task"
+          :icon="['fas', 'fa-plus']"
+          type="solid"
+          label="Add task" 
+          />
+      </div>
+    </div>
+  </EditorOptionsPanel>
+</template>
+
+
+<style scoped>
+#options {
+  display: flex;
+  flex-direction: column;
+  gap: 1rem;
+  
+  #controls {
+    display: flex;
+    justify-content: flex-end;
+    gap: 1rem;
+  }
+}
+
+.option-group {
+  display: flex;
+  flex-direction: column;
+  gap: 0.5rem;
+}
+
+.description {
+  font-size: 0.8em;
+}
+
+label {
+  font-weight: 700;
+}
+
+h2 {
+  border-bottom: 1px solid var(--color-border);
+  
+  code {
+    font-size: 0.8em;
+    color: var(--color-text-mute);
+  }
+}
+</style>
+
-- 
cgit v1.2.3-70-g09d2

