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() {}, };