0;
},
+ selectMode() {
+ return this.$root.selectMode;
+ },
+ selectedCount() {
+ return this.$root.selectedNotificationIds.length;
+ },
},
watch: {
loading() {
@@ -201,13 +238,24 @@ export default {
},
methods: {
open() {
+ this.cancelSelect();
this.$refs.drawer.open();
return this.$notificationService.resetBadge()
.then(() => this.$root.$emit('notification-badge-updated', 0));
},
close() {
+ this.cancelSelect();
this.$refs.drawer.close();
},
+ cancelSelect() {
+ this.$root.$emit('notification-cancel-select');
+ },
+ markSelectedAsRead() {
+ this.$root.$emit('notification-mark-selected-read');
+ },
+ deleteSelected() {
+ this.$root.$emit('notification-delete-selected');
+ },
incrementLoading() {
this.loading++;
},
diff --git a/webapp/src/main/webapp/vue-apps/notification-top-bar/main.js b/webapp/src/main/webapp/vue-apps/notification-top-bar/main.js
index fa08a86caba..891f3e286b3 100644
--- a/webapp/src/main/webapp/vue-apps/notification-top-bar/main.js
+++ b/webapp/src/main/webapp/vue-apps/notification-top-bar/main.js
@@ -49,6 +49,8 @@ export function init(badge) {
initialized: false,
lastLoadedNotificationIndex: 0,
now: Date.now(),
+ selectMode: false,
+ selectedNotificationIds: [],
},
template: ``,
vuetify: Vue.prototype.vuetifyOptions,