summaryrefslogtreecommitdiffstats
path: root/webapp/src/main.js
diff options
context:
space:
mode:
authorUdo Walter2018-11-24 20:00:29 +0100
committerUdo Walter2018-11-24 20:00:29 +0100
commit8a15b67a06fb3cdd7ba5f644475f07f5cf5ef96e (patch)
tree1d3e31971b57af585efa08b72dc606be2a2cf197 /webapp/src/main.js
parentmerge (diff)
downloadbas-8a15b67a06fb3cdd7ba5f644475f07f5cf5ef96e.tar.gz
bas-8a15b67a06fb3cdd7ba5f644475f07f5cf5ef96e.tar.xz
bas-8a15b67a06fb3cdd7ba5f644475f07f5cf5ef96e.zip
[webapp] Add notification system
Components can call this. and this. to display notifications
Diffstat (limited to 'webapp/src/main.js')
-rw-r--r--webapp/src/main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/webapp/src/main.js b/webapp/src/main.js
index 030f9f7..3f59ede 100644
--- a/webapp/src/main.js
+++ b/webapp/src/main.js
@@ -59,7 +59,14 @@ axios.interceptors.response.use(null, error => {
}
return Promise.reject(error)
})
+
Vue.prototype.$http = axios
+Vue.prototype.$alert = function (data) {
+ store.commit('notifications/newAlert', data)
+}
+Vue.prototype.$snackbar = function (data) {
+ store.commit('notifications/newSnackbar', data)
+}
new Vue({
store,