From 4f6142f9c034ebf4b7ea18517c3f56fa816b99f6 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 24 Nov 2023 22:44:27 +0200 Subject: [PATCH] adjust form builder --- app/javascript/application.js | 2 ++ app/javascript/template_builder/builder.vue | 17 ++++++++++++++--- .../template_builder/contenteditable.vue | 3 +-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/javascript/application.js b/app/javascript/application.js index da94ac1f..30e626d2 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -79,6 +79,8 @@ window.customElements.define('template-builder', class extends HTMLElement { connectedCallback () { this.appElem = document.createElement('div') + this.appElem.classList.add('md:h-screen') + this.app = createApp(TemplateBuilder, { template: reactive(JSON.parse(this.dataset.template)), backgroundColor: '#faf7f5', diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index d85582ef..b07107fb 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -4,6 +4,7 @@ class="mx-auto pl-3 md:pl-4 h-full" >
@@ -15,6 +16,7 @@
-
+

@@ -336,6 +342,11 @@ export default { required: false, default: true }, + withTitle: { + type: Boolean, + required: false, + default: true + }, withPhone: { type: Boolean, required: false, diff --git a/app/javascript/template_builder/contenteditable.vue b/app/javascript/template_builder/contenteditable.vue index 9dec5aff..05c04ad1 100644 --- a/app/javascript/template_builder/contenteditable.vue +++ b/app/javascript/template_builder/contenteditable.vue @@ -24,11 +24,10 @@ *