tuned confirm boxes
This commit is contained in:
@@ -14,7 +14,7 @@ class KeyframeView extends WindozDomContent {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
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) {
|
DOMContentFocused(options) {
|
||||||
@@ -105,7 +105,18 @@ class KeyframeView extends WindozDomContent {
|
|||||||
|
|
||||||
async onResetKF(evt){
|
async onResetKF(evt){
|
||||||
if(!this.currentKeyframe.kfId) return
|
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: `<p>You are about to discard all unsaved changes<br>and reload the saved version of "<b>${kfName}</b>".<br><br>
|
||||||
|
Are you sure?</p>`,
|
||||||
|
okLabel: 'Reset',
|
||||||
|
severity: 'warning',
|
||||||
|
okPromise: async () => {
|
||||||
|
await this.loadKeyframe(kfId)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadKeyframe(kfId){
|
async loadKeyframe(kfId){
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
|
<style>
|
||||||
|
article[eiccard] section:has(.confirm-dialog) {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.confirm-dialog > section {
|
||||||
|
margin:0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="confirm-dialog">
|
<div class="confirm-dialog">
|
||||||
<section>
|
<section eicalert ${severity}>
|
||||||
<alert eicalert ${severity} ${muted}>
|
|
||||||
${message}
|
${message}
|
||||||
</alert>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user