From eb7312c7a822eea922d20144f6ac5d2b30f681c8 Mon Sep 17 00:00:00 2001 From: STEINNI Date: Fri, 5 Jun 2026 08:57:33 +0000 Subject: [PATCH] tuned confirm boxes --- app/views/editors/KeyframeView.js | 15 +++++++++++++-- app/views/templates/dialogs/ConfirmDialog.html | 15 +++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/app/views/editors/KeyframeView.js b/app/views/editors/KeyframeView.js index cc9fc9d..65e6ad4 100644 --- a/app/views/editors/KeyframeView.js +++ b/app/views/editors/KeyframeView.js @@ -14,7 +14,7 @@ class KeyframeView extends WindozDomContent { constructor() { super() - Object.assign(this, app.helpers.activeAttributes, app.helpers.formBuilder, app.helpers.kfConsole) + Object.assign(this, app.helpers.activeAttributes, app.helpers.formBuilder, app.helpers.kfConsole, app.helpers.basicDialogs) } DOMContentFocused(options) { @@ -105,7 +105,18 @@ class KeyframeView extends WindozDomContent { async onResetKF(evt){ if(!this.currentKeyframe.kfId) return - await this.loadKeyframe(this.currentKeyframe.kfId) + const kfName = this.currentKeyframe.kfName + const kfId = this.currentKeyframe.kfId + await this.confirmDialog({ + title: 'Reset keyframe ?', + message: `

You are about to discard all unsaved changes
and reload the saved version of "${kfName}".

+ Are you sure?

`, + okLabel: 'Reset', + severity: 'warning', + okPromise: async () => { + await this.loadKeyframe(kfId) + } + }) } async loadKeyframe(kfId){ diff --git a/app/views/templates/dialogs/ConfirmDialog.html b/app/views/templates/dialogs/ConfirmDialog.html index 92a8497..379f6aa 100644 --- a/app/views/templates/dialogs/ConfirmDialog.html +++ b/app/views/templates/dialogs/ConfirmDialog.html @@ -1,8 +1,15 @@ + +
-
- - ${message} - +
+ ${message}
\ No newline at end of file