Copyright Annika Merris 2024
diff --git a/src/components/SpecialItemsCard.vue b/src/components/SpecialItemsCard.vue
index bf094e1..7c3b14c 100644
--- a/src/components/SpecialItemsCard.vue
+++ b/src/components/SpecialItemsCard.vue
@@ -3,7 +3,7 @@ import { usePowerItems } from '@/stores/powerItems'
import type { DataTableHeader } from '@/types/DataTableHeader'
import type { PowerItem } from '@/types/PowerItem'
import type { Ref } from 'vue'
-import { computed, ref } from 'vue'
+import { computed, ref, watch } from 'vue'
import { useDisplay } from 'vuetify'
import type { VDataTable } from 'vuetify/components'
@@ -128,11 +128,19 @@ const getColor = computed(() => (rarity: number): string => {
})
const allSelected = computed(() => events.value.length === selectedEvents.value.length)
const partialSelected = computed(() => selectedEvents.value.length > 0)
-toggle()
+const isLoading = computed((): boolean => props.items.keys()?.next().done ?? false)
+watch(isLoading, (newLoading) => {
+ if (!newLoading) {
+ toggle()
+ }
+})
+if (!isLoading.value) {
+ toggle()
+}
-
+
Special Items
Items from events
diff --git a/src/components/StandardItemsCard.vue b/src/components/StandardItemsCard.vue
index 5322730..a36ae0d 100644
--- a/src/components/StandardItemsCard.vue
+++ b/src/components/StandardItemsCard.vue
@@ -78,10 +78,11 @@ const getColor = computed(() => (rarity: number): string => {
return 'green'
}
})
+const isLoading = computed((): boolean => props.items.keys()?.next().done ?? false)
-
+
Standard Items
Items that exist all the time
diff --git a/src/components/SummaryCard.vue b/src/components/SummaryCard.vue
index 48e4f0d..69a681b 100644
--- a/src/components/SummaryCard.vue
+++ b/src/components/SummaryCard.vue
@@ -1,11 +1,12 @@
@@ -34,6 +44,7 @@ const {
/>
{
+ if (standardFellowItems.value.keys().next().done) {
+ usePowerItems().fetchFellowItems()
+ }
+ if (specialFellowItems.value.keys().next().done) {
+ usePowerItems().fetchFellowItems()
+ }
+})
@@ -33,6 +43,7 @@ const {
:average-total="specialFellowItemsAveTotal"
/>
{
+ if (standardIntimacyItems.value.keys().next().done) {
+ usePowerItems().fetchIntimacyItems()
+ }
+ if (specialIntimacyItems.value.keys().next().done) {
+ usePowerItems().fetchIntimacyItems()
+ }
+})
@@ -33,6 +43,7 @@ const {
:average-total="specialIntimacyItemsAveTotal"
/>