aboutsummaryrefslogtreecommitdiff
path: root/src/components/announcement/announcement.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/announcement/announcement.vue')
-rw-r--r--src/components/announcement/announcement.vue18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/announcement/announcement.vue b/src/components/announcement/announcement.vue
index d8591468..d6f35b9f 100644
--- a/src/components/announcement/announcement.vue
+++ b/src/components/announcement/announcement.vue
@@ -12,12 +12,20 @@
</div>
<div class="footer">
<button
+ v-if="currentUser"
class="btn button-default"
:class="{ toggled: isRead }"
@click="markAsRead"
>
{{ $t('announcements.mark_as_read_action') }}
</button>
+ <button
+ v-if="currentUser && currentUser.role === 'admin'"
+ class="btn button-default"
+ @click="deleteAnnouncement"
+ >
+ {{ $t('announcements.delete_action') }}
+ </button>
</div>
</div>
</template>
@@ -37,5 +45,15 @@
.heading, .body {
margin-bottom: var(--status-margin, $status-margin);
}
+
+ .footer {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+
+ .btn {
+ min-width: 10em;
+ }
+ }
}
</style>