From 4baacdd70453447d5cef2fcf59db1715684ff1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 31 May 2021 22:18:01 +0200 Subject: [PATCH] add recreate to GUI. --- client/src/components/RoomActionBtn.vue | 19 +++++++++++++++++++ client/src/components/RoomsList.vue | 4 ++++ client/src/store/index.ts | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/client/src/components/RoomActionBtn.vue b/client/src/components/RoomActionBtn.vue index e49e2f1..16001ae 100644 --- a/client/src/components/RoomActionBtn.vue +++ b/client/src/components/RoomActionBtn.vue @@ -45,6 +45,14 @@ export default class RoomActionBtn extends Vue { color: 'blue', icon: 'mdi-refresh', } + case 'recreate': + return { + dispatch: 'ROOMS_RECREATE', + msg: 'Room recreated!', + tooltip: 'Recreate', + color: 'blue', + icon: 'mdi-cloud-refresh', + } case 'remove': return { dispatch: 'ROOMS_REMOVE', @@ -71,6 +79,17 @@ export default class RoomActionBtn extends Vue { cancelButtonText: "No", }) + if (!value) return + } else if (this.action === 'recreate') { + const { value } = await this.$swal({ + title: "Recreate room", + text: "Do you really want to recreate this room? It will detele all your non-persistent data.", + icon: 'warning', + showCancelButton: true, + confirmButtonText: "Yes", + cancelButtonText: "No", + }) + if (!value) return } diff --git a/client/src/components/RoomsList.vue b/client/src/components/RoomsList.vue index 031f5ef..49f6880 100644 --- a/client/src/components/RoomsList.vue +++ b/client/src/components/RoomsList.vue @@ -22,6 +22,10 @@ Link to deployment +