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
+
+
+ {{ item.neko_image }}
+
{{ item.max_connections }}
--not-specified--
diff --git a/client/src/store/index.ts b/client/src/store/index.ts
index ea9ff60..08fc5b0 100644
--- a/client/src/store/index.ts
+++ b/client/src/store/index.ts
@@ -106,6 +106,12 @@ export default new Vuex.Store({
async ROOMS_RESTART(_: ActionContext, roomId: string) {
await roomsApi.roomRestart(roomId)
},
+ async ROOMS_RECREATE({ commit }: ActionContext, roomId: string) {
+ const res = await roomsApi.roomRecreate(roomId)
+ commit('ROOMS_DEL', roomId)
+ commit('ROOMS_PUT', res.data)
+ return res.data
+ },
},
modules: {
}