diff --git a/package.json b/package.json index 16d0f4a..fdf02b0 100755 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "normalize.css": "^8.0.0", "npm": "^6.9.0", "nprogress": "^0.2.0", - "quasar": "^1.0.0-beta.10", + "quasar": "^1.0.0-beta.11", "quasar-extras": "^2.0.8", "register-service-worker": "^1.0.0", "vee-validate": "^2.1.2", diff --git a/quasar.conf.js b/quasar.conf.js index 29b933b..31ee2ac 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -174,6 +174,7 @@ module.exports = function (ctx) { ], directives: [ 'Ripple', + 'ClosePopup' ], // Quasar plugins plugins: [ diff --git a/src/classes/routinestd.ts b/src/classes/routinestd.ts index c8f3ebc..a20af98 100644 --- a/src/classes/routinestd.ts +++ b/src/classes/routinestd.ts @@ -10,9 +10,11 @@ export async function askConfirm($q: any, mytitle, mytext, ok, cancel) { push: true }, title: mytitle - }).then((ris) => { - return ris - }).catch(() => { + }).onOk(() => { + console.log('OK') + return true + }).onCancel(() => { + console.log('CANCEL') return false }) } catch (e) { diff --git a/src/components/todos/SingleTodo/SingleTodo.ts b/src/components/todos/SingleTodo/SingleTodo.ts index b4d066a..d2f5fe8 100644 --- a/src/components/todos/SingleTodo/SingleTodo.ts +++ b/src/components/todos/SingleTodo/SingleTodo.ts @@ -458,15 +458,35 @@ export default class SingleTodo extends Vue { const cancelstr = this.$t('dialog.cancel') const msg = this.$t('dialog.msg.deleteTask', {mytodo : this.itemtodo.descr }) - await askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), msg, deletestr, cancelstr) - .then((ris) => { - console.log('ris', ris) - if (ris) { - this.removeitem(this.itemtodo._id) - } - }).catch((err) => { + this.$q.dialog({ + cancel: { + label: cancelstr + }, + message: msg, + ok: { + label: deletestr, + push: true + }, + title: this.$t('dialog.msg.titledeleteTask') + }).onOk(() => { + console.log('OK') + this.removeitem(this.itemtodo._id) + }).onCancel(() => { + console.log('CANCEL') }) + + /* + // return await askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), msg, deletestr, cancelstr) + .then((ris) => { + console.log('ris', ris) + if (ris) { + this.removeitem(this.itemtodo._id) + } + }).catch((err) => { + + }) + */ } } diff --git a/src/components/todos/SubMenus/SubMenus.vue b/src/components/todos/SubMenus/SubMenus.vue index 0a0220b..479c624 100644 --- a/src/components/todos/SubMenus/SubMenus.vue +++ b/src/components/todos/SubMenus/SubMenus.vue @@ -1,13 +1,13 @@