diff --git a/packages/builder/src/accessLevels/AccessLevelView.svelte b/packages/builder/src/accessLevels/AccessLevelView.svelte index ec91977b00..a21f768d7f 100644 --- a/packages/builder/src/accessLevels/AccessLevelView.svelte +++ b/packages/builder/src/accessLevels/AccessLevelView.svelte @@ -67,8 +67,9 @@ +

Permissions

{#each permissionMatrix as permission} -
+
- - Save - onFinished()}> - Cancel - - +
diff --git a/packages/builder/src/accessLevels/AccessLevelsRoot.svelte b/packages/builder/src/accessLevels/AccessLevelsRoot.svelte index 837749e6d9..4168d36bfb 100644 --- a/packages/builder/src/accessLevels/AccessLevelsRoot.svelte +++ b/packages/builder/src/accessLevels/AccessLevelsRoot.svelte @@ -82,7 +82,11 @@ {:else}(no actions added){/if} - + isEditing = false} + bind:isOpen={isEditing} + title={isEditing ? "Edit Access Level" : "Create Access Level"} + > {#if isEditing} { - actionsArray = pipe(s.actions, [keys, map(k => s.actions[k])]) + actionsArray = pipe( + s.actions, + [keys, map(k => s.actions[k])] + ) }) let getDefaultOptionsHtml = defaultOptions => - pipe(defaultOptions, [ - keys, - map( - k => - `${k}: ${JSON.stringify( - defaultOptions[k] - )}` - ), - join("
"), - ]) + pipe( + defaultOptions, + [ + keys, + map( + k => + `${k}: ${JSON.stringify( + defaultOptions[k] + )}` + ), + join("
"), + ] + ) let actionEditingFinished = action => { if (action) { @@ -79,7 +85,9 @@ {:else}(no actions added){/if} - + {#if isEditing} {} export let allTriggers export let allActions - export let isNew = true let clonedTrigger = cloneDeep(trigger) let errors = [] @@ -55,10 +54,12 @@ options={['', ...actionNames]} bind:selected={clonedTrigger.actionName} /> diff --git a/packages/builder/src/actionsAndTriggers/Triggers.svelte b/packages/builder/src/actionsAndTriggers/Triggers.svelte index 2e2eb132b8..522143a630 100644 --- a/packages/builder/src/actionsAndTriggers/Triggers.svelte +++ b/packages/builder/src/actionsAndTriggers/Triggers.svelte @@ -57,7 +57,10 @@ {:else}(no triggers added){/if} - + (isEditing = false)} + bind:isOpen={isEditing}> {#if isEditing} diff --git a/packages/builder/src/common/CodeArea.svelte b/packages/builder/src/common/CodeArea.svelte index 9e8e0eaff6..4ef86a6602 100644 --- a/packages/builder/src/common/CodeArea.svelte +++ b/packages/builder/src/common/CodeArea.svelte @@ -1,10 +1,17 @@ -
{label}
+
+ {#if javascript} + + {/if} + {label} +