aboutsummaryrefslogtreecommitdiffstats
path: root/components/editor/Sidebar.vue
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-03-10 17:17:01 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-03-10 17:30:57 +0000
commitaceef6edd8bd1663249e9d06fc1d4a063add4689 (patch)
treec20d9583dec6f3db0196c01bc1db219bdb384629 /components/editor/Sidebar.vue
parentba698216f7426d54310f2e9210756b3178d17def (diff)
Add more options to sidebar
Diffstat (limited to 'components/editor/Sidebar.vue')
-rw-r--r--components/editor/Sidebar.vue81
1 files changed, 77 insertions, 4 deletions
diff --git a/components/editor/Sidebar.vue b/components/editor/Sidebar.vue
index a46cdbe..20168df 100644
--- a/components/editor/Sidebar.vue
+++ b/components/editor/Sidebar.vue
@@ -5,14 +5,39 @@ import { storeToRefs } from 'pinia';
const sessionStore = useSessionStore();
const { session } = storeToRefs(sessionStore);
+
+const currentType = ref('quests' as 'quests' | 'items');
+
+const setSelectedType = (type: 'quests' | 'items') => {
+ currentType.value = type;
+}
</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 id="selector">
+ <span class="option" @click="setSelectedType('quests')" :class="{ selected: currentType === 'quests' }">
+ <span>
+ <font-awesome-icon :icon="['far', 'compass']" />
+ Quests
+ </span>
+ </span>
+ <span class="option" @click="setSelectedType('items')" :class="{ selected: currentType === 'items' }">
+ <span>
+ <font-awesome-icon :icon="['fas', 'cube']" />
+ Items
+ </span>
+ </span>
+ </div>
+ <div id="quests">
+ <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>
+ <div id="configuration-container">
+ <EditorSidebarMainConfiguration />
+ </div>
</div>
</template>
@@ -24,5 +49,53 @@ const { session } = storeToRefs(sessionStore);
max-height: calc(100vh - 73px);
background-color: var(--color-background);
user-select: none;
+ position: relative;
+
+ #selector {
+ display: flex;
+ height: 30px;
+ align-items: center;
+ cursor: pointer;
+
+ .option {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ transition: background-color 0.3s;
+
+ &.selected {
+ background-color: var(--color-background);
+
+ span {
+ font-weight: 700;
+ }
+ }
+
+ &:not(.selected) {
+ background-color: var(--color-background-mute);
+ color: var(--color-text-mute);
+ transition: color 0.3s;
+
+ &:hover {
+ color: var(--color-text)
+ }
+ }
+ }
+ }
+
+ #quests {
+ max-height: calc(100vh - 73px - 46px);
+ overflow-y: scroll;
+ }
+
+ #configuration-container {
+ height: 46px;
+ border-top: 1px solid var(--color-border);
+ position: absolute;
+ bottom: 0;
+ width: 100%
+ }
}
</style> \ No newline at end of file