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 +