add field area controls

This commit is contained in:
Alex Turchyn
2023-06-04 01:08:45 +03:00
parent 4c74290bf0
commit f5c00ada31
13 changed files with 382 additions and 165 deletions
+8
View File
@@ -14,6 +14,12 @@ document.addEventListener('turbo:before-cache', () => {
window.flash?.remove()
})
document.addEventListener('keyup', (e) => {
if (e.code === 'Escape') {
document.activeElement?.blur()
}
})
window.customElements.define('toggle-visible', ToggleVisible)
window.customElements.define('disable-hidden', DisableHidden)
window.customElements.define('turbo-modal', TurboModal)
@@ -29,6 +35,8 @@ window.customElements.define('template-builder', class extends HTMLElement {
template: reactive(JSON.parse(this.dataset.template))
})
this.app.config.globalProperties.$t = (key) => TemplateBuilder.i18n[key] || key
this.app.mount(this.appElem)
this.appendChild(this.appElem)