mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Fix Modal Stack - reopening modals (#10493)
* use fallback target.id - only scroll modal content (not the page) * fix lint * debug information * add snackbar onClick callback - use notification instead of modal for joined-challenge * revert console.log / fix lint
This commit is contained in:
@@ -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')
|
||||
@@ -146,6 +146,15 @@ export default {
|
||||
beforeDestroy () {
|
||||
clearTimeout(this.timer);
|
||||
},
|
||||
methods: {
|
||||
handleOnClick () {
|
||||
if (typeof this.notification.onClick === 'function') {
|
||||
this.notification.onClick();
|
||||
}
|
||||
|
||||
this.show = false;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
show () {
|
||||
this.$store.dispatch('snackbars:remove', this.notification);
|
||||
|
||||
Reference in New Issue
Block a user