Merge branch 'add-confirmation-step-to-delete-conversation' into 'master'
Add a confirmation before conversation deletion Closes #383 See merge request framasoft/mobilizon!844
This commit is contained in:
commit
74923c91d8
|
@ -957,5 +957,8 @@
|
|||
"The group's banner was changed.": "The group's banner was changed.",
|
||||
"The group's short description was changed.": "The group's short description was changed.",
|
||||
"No information": "No information",
|
||||
"@{username}'s follow request was accepted": "@{username}'s follow request was accepted"
|
||||
"@{username}'s follow request was accepted": "@{username}'s follow request was accepted",
|
||||
"Delete this discussion": "Delete this discussion",
|
||||
"Are you sure you want to delete this entire discussion?": "Are you sure you want to delete this entire discussion?",
|
||||
"Delete discussion": "Delete discussion"
|
||||
}
|
||||
|
|
|
@ -1051,5 +1051,8 @@
|
|||
"{username} was invited to {group}": "{username} a été invité à {group}",
|
||||
"© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap",
|
||||
"No information": "Non renseigné",
|
||||
"@{username}'s follow request was accepted": "@{username}'s follow request was accepted"
|
||||
"@{username}'s follow request was accepted": "@{username}'s follow request was accepted",
|
||||
"Delete this discussion": "Supprimer cette discussion",
|
||||
"Are you sure you want to delete this entire discussion?": "Êtes-vous certain⋅e de vouloir supprimer l'entièreté de cette discussion ?",
|
||||
"Delete discussion": "Supprimer la discussion"
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
icon-right="close"
|
||||
/>
|
||||
<b-button
|
||||
@click="deleteConversation"
|
||||
@click="openDeleteDiscussionConfirmation"
|
||||
type="is-danger"
|
||||
native-type="button"
|
||||
icon-left="delete"
|
||||
|
@ -388,6 +388,19 @@ export default class discussion extends mixins(GroupMixin) {
|
|||
this.editTitleMode = false;
|
||||
}
|
||||
|
||||
openDeleteDiscussionConfirmation(): void {
|
||||
this.$buefy.dialog.confirm({
|
||||
type: "is-danger",
|
||||
title: this.$t("Delete this discussion") as string,
|
||||
message: this.$t(
|
||||
"Are you sure you want to delete this entire discussion?"
|
||||
) as string,
|
||||
confirmText: this.$t("Delete discussion") as string,
|
||||
cancelText: this.$t("Cancel") as string,
|
||||
onConfirm: () => this.deleteConversation(),
|
||||
});
|
||||
}
|
||||
|
||||
async deleteConversation(): Promise<void> {
|
||||
await this.$apollo.mutate({
|
||||
mutation: DELETE_DISCUSSION,
|
||||
|
|
Loading…
Reference in a new issue