aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEvan Steinkerchner <esteinkerchner@gmail.com>2022-04-28 17:07:52 -0400
committerEvan Steinkerchner <esteinkerchner@gmail.com>2022-04-28 17:07:52 -0400
commit4d35b1fdccef0c608f4cf0f7351068c7de2c326d (patch)
tree6770c9351449f3841b5578bd0df6c672de7f2290
parent2c79b4f0f68bdb9cf514ffb34ce28757b3862e05 (diff)
downloadhomer-4d35b1fdccef0c608f4cf0f7351068c7de2c326d.tar.gz
homer-4d35b1fdccef0c608f4cf0f7351068c7de2c326d.tar.zst
homer-4d35b1fdccef0c608f4cf0f7351068c7de2c326d.zip
Fixed issue where v-for keys could clash if two groups had the same name
-rw-r--r--src/App.vue13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue
index fda13c3..042fb07 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -69,8 +69,11 @@
69 69
70 <!-- Horizontal layout --> 70 <!-- Horizontal layout -->
71 <div v-if="!vlayout || filter" class="columns is-multiline"> 71 <div v-if="!vlayout || filter" class="columns is-multiline">
72 <template v-for="group in services"> 72 <template v-for="(group, groupIndex) in services">
73 <h2 v-if="group.name" class="column is-full group-title"> 73 <h2
74 v-if="group.name"
75 class="column is-full group-title"
76 :key="`header-${groupIndex}`">
74 <i v-if="group.icon" :class="['fa-fw', group.icon]"></i> 77 <i v-if="group.icon" :class="['fa-fw', group.icon]"></i>
75 <div v-else-if="group.logo" class="group-logo media-left"> 78 <div v-else-if="group.logo" class="group-logo media-left">
76 <figure class="image is-48x48"> 79 <figure class="image is-48x48">
@@ -81,7 +84,7 @@
81 </h2> 84 </h2>
82 <Service 85 <Service
83 v-for="(item, index) in group.items" 86 v-for="(item, index) in group.items"
84 :key="index" 87 :key="`service-${groupIndex}-${index}`"
85 :item="item" 88 :item="item"
86 :proxy="config.proxy" 89 :proxy="config.proxy"
87 :class="['column', `is-${12 / config.columns}`]" 90 :class="['column', `is-${12 / config.columns}`]"
@@ -96,8 +99,8 @@
96 > 99 >
97 <div 100 <div
98 :class="['column', `is-${12 / config.columns}`]" 101 :class="['column', `is-${12 / config.columns}`]"
99 v-for="group in services" 102 v-for="(group, groupIndex) in services"
100 :key="group.name" 103 :key="groupIndex"
101 > 104 >
102 <h2 v-if="group.name" class="group-title"> 105 <h2 v-if="group.name" class="group-title">
103 <i v-if="group.icon" :class="['fa-fw', group.icon]"></i> 106 <i v-if="group.icon" :class="['fa-fw', group.icon]"></i>