diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2024-03-10 00:13:25 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2024-03-10 00:13:25 +0000 |
| commit | 9a11e0f4a38297006b89cc7bb2a60734111582e0 (patch) | |
| tree | 5ebddde79e67b659714b5dbdbfcea289f06a4ae5 /components/Editor/EditorSidebar.vue | |
| parent | 817478f3cf357fc09778d9dc3cf67a667e21f042 (diff) | |
Migrate to nuxt
Diffstat (limited to 'components/Editor/EditorSidebar.vue')
| -rw-r--r-- | components/Editor/EditorSidebar.vue | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/Editor/EditorSidebar.vue b/components/Editor/EditorSidebar.vue new file mode 100644 index 0000000..c9539fa --- /dev/null +++ b/components/Editor/EditorSidebar.vue @@ -0,0 +1,28 @@ +<script setup lang="ts"> +import { useSessionStore } from '@/stores/session'; +import { storeToRefs } from 'pinia'; +import EditorSidebarCategory from '@/components/Editor/EditorSidebarCategory.vue'; +import EditorSidebarQuest from '@/components/Editor/EditorSidebarQuest.vue'; + +const sessionStore = useSessionStore(); + +const { session } = storeToRefs(sessionStore); +</script> + +<template> + <div id="sidebar-container"> + <EditorSidebarCategory v-for="category in session.categories" :key="category.id" :category="category" /> + <EditorSidebarQuest v-for="quest in session.quests.filter((q) => (!session.categories.some((c) => c.id === q.options.category)))" :key="quest.id" :quest="quest" /> + </div> +</template> + +<style scoped> +#sidebar-container { + width: 20rem; + border-right: 1px solid var(--color-border); + height: calc(100vh - 73px); + max-height: calc(100vh - 73px); + background-color: var(--color-background); + user-select: none; +} +</style>
\ No newline at end of file |
