vue3
koehr 4 years ago
parent c3db15a1f8
commit 1c146816ab

@ -1,8 +0,0 @@
<template>
<p class="note warning">
<strong>This is a pre-alpha version.</strong>
Many features are still unstable or completely missing.
<br />
Check out <a href="https://github.com/nkoehring/rpg-cards-ng/">the code repository</a> for more information.
</p>
</template>

@ -1,6 +1,6 @@
<template> <template>
<transition-group name="notifications" tag="section" class="notification-section"> <transition-group name="notifications" tag="section" class="notification-section">
<p class="note" :class="note.level" v-for="note in notDismissedNotes"> <p class="note" :class="note.level" v-for="note in notifications">
<strong>{{ note.title }}</strong> <strong>{{ note.title }}</strong>
<div v-html="note.content" /> <div v-html="note.content" />
<button @click="$emit('dismiss', note)">dismiss</button> <button @click="$emit('dismiss', note)">dismiss</button>
@ -16,12 +16,6 @@ export default defineComponent({
name: 'Notifications', name: 'Notifications',
props: { props: {
notifications: Array notifications: Array
},
computed: {
notDismissedNotes (): Notification[] {
const notes = this.notifications as Notification[]
return notes.filter(note => !note.dismissed)
}
} }
}) })
</script> </script>

Loading…
Cancel
Save