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

View File

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