From a4052ffee8bc7c6c8a69eba5120b5c6c2d951b0f Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Tue, 12 Mar 2024 19:18:52 +0000
Subject: Add items

---
 components/editor/EditorSidebar.vue | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'components/editor/EditorSidebar.vue')

diff --git a/components/editor/EditorSidebar.vue b/components/editor/EditorSidebar.vue
index 992dd86..48e187f 100644
--- a/components/editor/EditorSidebar.vue
+++ b/components/editor/EditorSidebar.vue
@@ -24,7 +24,7 @@ const setSelectedType = (type: 'quests' | 'items') => {
       </span>
       <span class="option" @click="setSelectedType('items')" :class="{ selected: currentType === 'items' }">
         <span>
-          <font-awesome-icon :icon="['fas', 'cube']" />
+          <font-awesome-icon :icon="['fas', 'cubes']" />
           Items
         </span>
       </span>
@@ -34,6 +34,13 @@ const setSelectedType = (type: 'quests' | 'items') => {
       <EditorSidebarQuest
         v-for="quest in session.quests.filter((q) => (!session.categories.some((c) => c.id === q.options.category)))"
         :key="quest.id" :quest="quest" />
+      <p id="count">{{ session.quests.length }} quest{{ session.quests.length === 1 ? '' : 's' }}, {{
+        session.categories.length }}
+        categor{{ session.categories.length === 1 ? 'y' : 'ies' }}</p>
+    </div>
+    <div id="items" v-if="currentType === 'items'">
+      <EditorSidebarItem v-for="item in session.items" :key="item.id" :item="item" />
+      <p id="count">{{ session.items.length }} item{{ session.items.length === 1 ? '' : 's' }}</p>
     </div>
     <div id="configuration-container">
       <EditorSidebarMainConfiguration />
@@ -99,5 +106,12 @@ const setSelectedType = (type: 'quests' | 'items') => {
     bottom: 0;
     width: 100%
   }
+
+  #count {
+    margin: 0.5rem 0;
+    font-size: 0.7rem;
+    text-align: center;
+    color: var(--color-text-mute);
+  }
 }
 </style>
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

