From e518da0a62080d7a0bc2474e6ebc7f692d84c3ac Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 24 Feb 2020 16:41:02 +0000 Subject: [PATCH] global style abstraction, backend UI updates --- .../src/accessLevels/AccessLevelView.svelte | 21 +++-- .../src/accessLevels/AccessLevelsRoot.svelte | 6 +- .../src/actionsAndTriggers/Actions.svelte | 32 ++++--- .../src/actionsAndTriggers/TriggerView.svelte | 7 +- .../src/actionsAndTriggers/Triggers.svelte | 5 +- packages/builder/src/budibase.css | 93 +++++++++++++++++++ .../builder/src/common/ActionButton.svelte | 2 +- .../builder/src/common/ButtonGroup.svelte | 2 +- packages/builder/src/common/CodeArea.svelte | 19 +++- .../builder/src/common/ConfirmDialog.svelte | 6 +- .../src/common/Icons/JavaScript.svelte | 31 +++++++ packages/builder/src/common/Icons/index.js | 1 + packages/builder/src/common/Modal.svelte | 16 +++- packages/builder/src/common/NumberBox.svelte | 2 +- packages/builder/src/common/Select.svelte | 1 + .../builder/src/database/ActionsHeader.svelte | 18 ++-- .../builder/src/database/IndexView.svelte | 36 ++++--- .../builder/src/database/RecordView.svelte | 1 + packages/builder/src/global.css | 89 +----------------- packages/builder/src/nav/BackendNav.svelte | 2 - packages/builder/src/nav/NavItem.svelte | 8 +- .../userInterface/ComponentsHierarchy.svelte | 2 +- .../EventsEditor/EventsEditor.svelte | 1 + .../src/userInterface/MasterLayout.svelte | 2 +- .../server/builder/assets/javascript-logo.svg | 1 + 25 files changed, 252 insertions(+), 152 deletions(-) create mode 100644 packages/builder/src/budibase.css create mode 100644 packages/builder/src/common/Icons/JavaScript.svelte create mode 100644 packages/server/builder/assets/javascript-logo.svg 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} +