@enso-ui/notifications 3.2.13 → 3.3.0

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/README.md CHANGED
@@ -52,6 +52,10 @@ Common imports:
52
52
  - wraps the core renderless notifications controller
53
53
  - renders unread count, dropdown items, and mark-all-as-read actions
54
54
 
55
+ Notification `data.path` accepts a URL path string or a Vue Router location
56
+ object, such as `{ name: "projects.show", params: { project: 42 } }`. The inbox,
57
+ navbar, and desktop notification clicks use the same destination format.
58
+
55
59
  ### Settings component
56
60
 
57
61
  `src/bulma/components/settings/ToastrPosition.vue`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/notifications",
3
- "version": "3.2.13",
3
+ "version": "3.3.0",
4
4
  "description": "Notification center pages and navbar widgets for Enso UI",
5
5
  "main": "src/bulma/pages/Index.vue",
6
6
  "repository": {
@@ -137,7 +137,7 @@ export default {
137
137
  eventBus.$emit('read-notification', notification);
138
138
 
139
139
  if (notification.data.path && notification.data.path !== '#') {
140
- this.$router.push({ path: notification.data.path })
140
+ this.$router.push(notification.data.path)
141
141
  .catch(this.routerErrorHandler);
142
142
  }
143
143
  }).catch(this.errorHandler);
@@ -110,7 +110,7 @@ export default {
110
110
 
111
111
  notification.onclick = () => {
112
112
  if (path) {
113
- this.$router.push({ path })
113
+ this.$router.push(path)
114
114
  .catch(this.routerErrorHandler);
115
115
  }
116
116
 
@@ -178,7 +178,7 @@ export default {
178
178
  notification.read_at = data.read_at;
179
179
 
180
180
  if (notification.data.path && notification.data.path !== '#') {
181
- this.$router.push({ path: notification.data.path })
181
+ this.$router.push(notification.data.path)
182
182
  .catch(this.routerErrorHandler);
183
183
  }
184
184
  }).catch(this.errorHandler);