[web] Remove notification identifier

This commit is contained in:
Alain Nussbaumer 2025-03-25 21:21:30 +01:00
parent 582074e8ff
commit e7fcf7dd80
2 changed files with 3 additions and 4 deletions

View File

@ -3,8 +3,8 @@
<div class="columns is-centered"> <div class="columns is-centered">
<div class="column is-half"> <div class="column is-half">
<div <div
v-for="notification in notificationsStore.list" v-for="(notification, index) in notificationsStore.list"
:key="notification.id" :key="index"
class="notification" class="notification"
:class="notification.type ? `is-${notification.type}` : ''" :class="notification.type ? `is-${notification.type}` : ''"
> >

View File

@ -4,7 +4,6 @@ export const useNotificationsStore = defineStore('NotificationsStore', {
actions: { actions: {
add(notification) { add(notification) {
const newNotification = { const newNotification = {
id: this.nextId++,
text: notification.text, text: notification.text,
timeout: notification.timeout, timeout: notification.timeout,
topic: notification.topic, topic: notification.topic,
@ -36,5 +35,5 @@ export const useNotificationsStore = defineStore('NotificationsStore', {
getters: { getters: {
isEmpty: (state) => state.list.length <= 0 isEmpty: (state) => state.list.length <= 0
}, },
state: () => ({ list: [], nextId: 1 }) state: () => ({ list: [] })
}) })