This commit is contained in:
Martin McKeaveney 2021-05-10 14:50:37 +01:00
parent 27498a4926
commit 5ae9b46226
5 changed files with 21 additions and 14 deletions

View File

@ -9,7 +9,8 @@
<p
class:noPadding
class="spectrum-Body spectrum-Body--size{size}"
class:spectrum-Body--serif={serif}>
class:spectrum-Body--serif={serif}
>
<slot />
</p>

View File

@ -74,9 +74,9 @@
on:change={e => (block.inputs[key] = e.detail)}
{bindings}
/>
{:else if value.customType === 'query'}
{:else if value.customType === "query"}
<QuerySelector bind:value={block.inputs[key]} />
{:else if value.customType === 'queryParams'}
{:else if value.customType === "queryParams"}
<QueryParamSelector bind:value={block.inputs[key]} {bindings} />
{:else if value.customType === "table"}
<TableSelector bind:value={block.inputs[key]} />
@ -91,7 +91,7 @@
<pre>{JSON.stringify(bindings, null, 2)}</pre>
<Editor
mode="javascript"
on:change={e => {
on:change={e => {
block.inputs[key] = e.detail.value
}}
value={block.inputs[key]}

View File

@ -16,7 +16,8 @@
size="XL"
title="Edit Code"
showConfirmButton={false}
showCancelButton={false}>
showCancelButton={false}
>
<div class="container">
<slot />
</div>

View File

@ -132,7 +132,7 @@
if (destroyed) return
CodeMirror.commands.autocomplete = function(cm) {
CodeMirror.commands.autocomplete = function (cm) {
CodeMirror.showHint(cm, CodeMirror.hint.javascript)
}

View File

@ -161,14 +161,19 @@
</div>
</div>
<Modal bind:this={htmlModal}>
<ModalContent title="Edit Template HTML" onConfirm={saveTemplate} size="XL">
<Editor
mode="handlebars"
on:change={e => {
selectedTemplate.contents = e.detail.value
}}
value={selectedTemplate.contents} />
</ModalContent>
<ModalContent
title="Edit Template HTML"
onConfirm={saveTemplate}
size="XL"
>
<Editor
mode="handlebars"
on:change={e => {
selectedTemplate.contents = e.detail.value
}}
value={selectedTemplate.contents}
/>
</ModalContent>
</Modal>
{/if}
</Page>