move modals to notifications (to open the modals)

This commit is contained in:
negue
2018-07-20 23:56:36 +02:00
parent 284b2cc413
commit b75e65f42d
4 changed files with 95 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
<template lang="pug">
transition(name="fade")
.notification.callout.animated(:class="classes", v-if='show', @click='show = false')
.notification.callout.animated(:class="classes", v-if='show', @click='handleOnClick()')
.row(v-if='notification.type === "error"')
.text.col-12
div(v-html='notification.text')
@@ -151,6 +151,14 @@ export default {
this.$store.dispatch('snackbars:remove', this.notification);
},
},
methods: {
handleOnClick () {
if (typeof this.notification.onClick === 'function') {
this.notification.onClick();
}
this.show = false;
},
},
computed: {
message () {
if (this.notification.flavorMessage) {