@enso-ui/notifications 2.0.11 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="level is-mobile">
|
|
5
5
|
<div class="level-item"
|
|
6
6
|
v-if="notifications.length">
|
|
7
|
-
<a class="button is-success
|
|
7
|
+
<a class="button is-success"
|
|
8
8
|
@click="readAll">
|
|
9
9
|
<span>{{ i18n("Mark all read") }}</span>
|
|
10
10
|
<span class="icon is-small">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
<div class="level-item is-marginless"
|
|
27
27
|
v-if="notifications.length">
|
|
28
|
-
<a class="button is-warning
|
|
28
|
+
<a class="button is-warning ml-1"
|
|
29
29
|
@click="destroyAll">
|
|
30
30
|
<span>{{ i18n("Clear all") }}</span>
|
|
31
31
|
<span class="icon is-small">
|
|
@@ -95,6 +95,11 @@ export default {
|
|
|
95
95
|
|
|
96
96
|
inject: ['errorHandler', 'i18n', 'route', 'routerErrorHandler'],
|
|
97
97
|
|
|
98
|
+
emits: [
|
|
99
|
+
'read-notification', 'read-all-notifications',
|
|
100
|
+
'destroy-notification', 'destroy-all-notification',
|
|
101
|
+
],
|
|
102
|
+
|
|
98
103
|
components: { Fa, Fade },
|
|
99
104
|
|
|
100
105
|
data: () => ({
|
|
@@ -149,7 +154,7 @@ export default {
|
|
|
149
154
|
},
|
|
150
155
|
updateAll() {
|
|
151
156
|
this.notifications.forEach(notification => {
|
|
152
|
-
notification.read_at = notification.read_at || format(new Date(), 'Y-
|
|
157
|
+
notification.read_at = notification.read_at || format(new Date(), 'Y-M-D H:i:s');
|
|
153
158
|
});
|
|
154
159
|
|
|
155
160
|
this.unreadCount = 0;
|
package/src/bulma/register.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
1
|
import App from '@enso-ui/ui/src/core/app';
|
|
3
2
|
import Notification from './components/navbar/Notifications.vue';
|
|
4
3
|
import ToastPosition from './components/settings/ToastrPosition.vue';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
App.registerNavbarItem('navbar-notification', 300, 'core.notifications.count');
|
|
9
|
-
App.registerSettingsItem('setting-toaster-position', 300);
|
|
5
|
+
App.registerNavbarItem('navbar-notification', Notification, 300, 'core.notifications.count');
|
|
6
|
+
App.registerSettingsItem('setting-toaster-position', ToastPosition, 300);
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
created() {
|
|
19
19
|
if (this.toastrPosition) {
|
|
20
|
-
this.toastr.
|
|
20
|
+
this.toastr.position(this.toastrPosition).reset();
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
...mapActions('preferences', ['setToastrPosition']),
|
|
26
26
|
update(position) {
|
|
27
27
|
this.setToastrPosition(position);
|
|
28
|
-
this.toastr.
|
|
28
|
+
this.toastr.position(position).reset();
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
|