From dc2d69356256f6c987e6242b5d9956ac09b0aaa1 Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Fri, 10 May 2019 09:23:55 +0200 Subject: [PATCH] added confirmation promt to delete Cache --- frontend/quasar.conf.js | 3 ++- frontend/src/pages/Login.vue | 2 +- frontend/src/pages/Overview.vue | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/frontend/quasar.conf.js b/frontend/quasar.conf.js index 7e353ec..f1a98b0 100644 --- a/frontend/quasar.conf.js +++ b/frontend/quasar.conf.js @@ -81,7 +81,8 @@ module.exports = function (ctx) { // Quasar plugins plugins: [ - 'Notify' + 'Notify', + 'Dialog' ] // iconSet: 'ionicons-v4' diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index ec2a41d..96418a7 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -138,7 +138,7 @@ }, evalAuthentication: function () { this.$store.commit('auth/SET_AUTHENTICATED'); - this.$store.commit('auth/SET_USER'); + // this.$store.commit('auth/SET_USER'); }, logout: function () { console.log("logout()"); diff --git a/frontend/src/pages/Overview.vue b/frontend/src/pages/Overview.vue index d55cae8..2f0d8ad 100644 --- a/frontend/src/pages/Overview.vue +++ b/frontend/src/pages/Overview.vue @@ -45,7 +45,7 @@ - @@ -154,6 +154,22 @@ this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: message, title: header, }); }) }, + + confirmDelete(cacheID) { + this.$q.dialog({ + title: 'Löschen...', + message: 'Willst du diesen Cache wirklich löschen?', + persistent: true, + cancel: true, + }).onOk(() => { + console.log('>>>> OK'); + this.deleteCache(cacheID) + }).onCancel(() => { + console.log('>>>> Cancel') + }).onDismiss(() => { + }) + }, + addCache() { this.$router.push({path: `/cache`}) },