From 75d01cba393b863a536f8afa84f7a1f82974f43b Mon Sep 17 00:00:00 2001 From: Gabriel Pastori <58153955+gabrielpastori1@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:39:08 -0300 Subject: [PATCH] new instance layout --- src/views/Home.vue | 148 ++++++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 68 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 4cf2c1d..fa73d09 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -24,73 +24,84 @@ + + + + + {{ loading ? "Carregando..." : "Nenhuma instância encontrada" }} + + - - - - - - - - - - - +
+ + + {{ statusMapper[instance.status].icon }} + +
+ + + {{ statusMapper[instance.status].icon }} + + {{ statusMapper[instance.status].text }} + +
{{ instance.instanceName }}
+
+
+ + + mdi-delete + +
+
+ + +
{{ error }} @@ -123,13 +134,16 @@ export default { key: "instance.instanceName", }, { title: "Status", key: "instance.status" }, - { title: "Ações", key: "actions", sortable: false , align: "center"}, + { title: "Ações", key: "actions", sortable: false, align: "center" }, ], }), methods: { addInstance() { this.$refs.createInstanceModal.open(); }, + goToInstance(instance) { + this.$router.push(`/${instance.instanceName}`); + }, async deleteInstance(instanceName) { try { this.loadingDelete = instanceName; @@ -138,7 +152,6 @@ export default { ); if (!confirm) return; - await instanceController.logout(instanceName).catch(() => {}); await instanceController.delete(instanceName); await this.AppStore.reconnect(); @@ -165,7 +178,6 @@ export default { return this.AppStore.instances; }, }, - mounted() { - }, + mounted() {}, };