Add custom title for confirm modal dialog

Resolves MS-521
This commit is contained in:
Ramon Wenger 2022-06-23 12:18:31 +02:00
parent 0b70537241
commit 2c31fc60fe
2 changed files with 11 additions and 3 deletions

View File

@ -5,7 +5,7 @@
> >
<template #header> <template #header>
<h3 class="confirm-dialog__heading"> <h3 class="confirm-dialog__heading">
Bestätigung {{ title }}
</h3> </h3>
</template> </template>
<p class="confirm-dialog__content"> <p class="confirm-dialog__content">
@ -39,6 +39,12 @@
Modal Modal
}, },
computed: {
title() {
return this.$modal.state.payload.title || "Bestätigung";
}
},
methods: { methods: {
confirm() { confirm() {
this.$modal.confirm(); this.$modal.confirm();

View File

@ -114,7 +114,9 @@
.catch(); .catch();
}, },
deleteSnapshot() { deleteSnapshot() {
this.$modal.open('confirm') this.$modal.open('confirm', {
title: 'Snapshot löschen'
})
.then(() => { .then(() => {
this.$apollo.mutate({ this.$apollo.mutate({
mutation: DELETE_SNAPSHOT_MUTATION, mutation: DELETE_SNAPSHOT_MUTATION,
@ -154,7 +156,7 @@
}, },
}); });
}) })
.catch(); .catch(() => {});
}, },
share() { share() {
this.$apollo.mutate({ this.$apollo.mutate({