From 6fcc3ad1630187b8309cf784b365778619def629 Mon Sep 17 00:00:00 2001 From: Joe <49767913+joebudi@users.noreply.github.com> Date: Tue, 2 Jun 2020 19:59:58 +0100 Subject: [PATCH] Backend modal UI update Models include: Create new view Create new model Create new field Create new user --- packages/builder/src/budibase.css | 27 ++--- .../src/components/common/ActionButton.svelte | 22 ++-- .../src/components/common/CodeArea.svelte | 3 +- .../src/components/common/Modal.svelte | 4 +- .../ModelDataTable/ModelDataTable.svelte | 14 +-- .../CreateEditModel/CreateEditModel.svelte | 57 ++++++---- .../modals/CreateEditView.svelte | 100 +++++++++++------- .../ModelDataTable/modals/CreateUser.svelte | 2 +- 8 files changed, 141 insertions(+), 88 deletions(-) diff --git a/packages/builder/src/budibase.css b/packages/builder/src/budibase.css index 283a761c3b..7aa47605f9 100644 --- a/packages/builder/src/budibase.css +++ b/packages/builder/src/budibase.css @@ -1,8 +1,7 @@ /* Budibase Component Styles */ .header { font-size: 0.75rem; - color: #000333; - opacity: 0.4; + color: var(--ink); text-transform: uppercase; margin-top: 1rem; font-weight: 500; @@ -81,10 +80,9 @@ max-width: 250px; height: 35px; border-radius: 3px; - border: 1px solid #DBDBDB; + border: 1px solid var(--grey-dark); text-align: left; - letter-spacing: 0.7px; - color: #000333; + color: var(--ink); font-size: 16px; padding-left: 5px; } @@ -103,27 +101,32 @@ } .budibase__table { - border: 1px solid #ccc; + border: 1px solid var(--grey-dark); background: #fff; border-radius: 2px; } .budibase__table thead { - background: #fafafa; + background: var(--blue-light); } .budibase__table thead > tr > th { - color: var(--button-text); + color: var(--ink); text-transform: capitalize; font-weight: 500; } .budibase__table tr { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid var(--blue-light); } .button--toggled { - background: #fafafa; - color: var(--button-text); - padding: 10px; + background: var(--blue-light); + color: var(--ink-light); + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; } \ No newline at end of file diff --git a/packages/builder/src/components/common/ActionButton.svelte b/packages/builder/src/components/common/ActionButton.svelte index f8eb00f6e3..153d00b6a6 100644 --- a/packages/builder/src/components/common/ActionButton.svelte +++ b/packages/builder/src/components/common/ActionButton.svelte @@ -1,6 +1,7 @@ - + {#if !showFieldView} Create / Edit Model @@ -43,22 +43,20 @@ Create / Edit Field {/if} - + {#if !showFieldView} - Settings - {#if $store.errors && $store.errors.length > 0} {/if} - - - + + + - Fields - (showFieldView = true)}> + Fields + (showFieldView = true)}> Add new field - + @@ -67,7 +65,6 @@ Edit Name Type - Values @@ -90,9 +87,9 @@ {/each} - + + {:else} .padding { - padding: 20px; + padding-top: 40px; + } + + .label { + font-size: 14px; + font-weight: 500; + } + + .textbox { + margin: 0px 40px 0px 40px; + font-size: 14px; + font-weight: 500; } .new-field { font-size: 16px; font-weight: bold; - color: var(--button-text); + color: var(--blue); } .fields-table { - margin: 1rem 1rem 0rem 0rem; + margin: 8px 40px 0px 40px; border-collapse: collapse; + width: 88%; } tbody > tr:hover { - background-color: var(--primary10); + background-color: var(--blue-light); } .table-controls { display: flex; justify-content: space-between; align-items: center; + margin: 0px 40px; } .ri-more-line:hover { cursor: pointer; } - heading { - padding: 20px 20px 0 20px; + .heading { + padding: 40px 40px 0 40px; display: flex; align-items: center; } h3 { margin: 0 0 0 10px; + color: var(--ink); + } + + footer { + margin: 40px 40px 0px 40px; + background-color: var(--grey-light); + padding: 20px 0px; + display: flex; + justify-content: flex-end; } diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte index 606310d44f..7ca59e87f2 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte @@ -39,51 +39,49 @@ } - + Create / Edit View - - - Settings - {#if $store.errors && $store.errors.length > 0} - - {/if} - - - + + + {#if $store.errors && $store.errors.length > 0} + + {/if} + + + + + + + + {#each Object.values(SNIPPET_EDITORS) as snippetType} + (currentSnippetEditor = snippetType)}> + {snippetType} + + {/each} + {#if currentSnippetEditor === SNIPPET_EDITORS.MAP} + + {:else if currentSnippetEditor === SNIPPET_EDITORS.FILTER} + + {:else if currentSnippetEditor === SNIPPET_EDITORS.REDUCE} + + {/if} - - Snippets - {#each Object.values(SNIPPET_EDITORS) as snippetType} - (currentSnippetEditor = snippetType)}> - {snippetType} - - {/each} - {#if currentSnippetEditor === SNIPPET_EDITORS.MAP} - - {:else if currentSnippetEditor === SNIPPET_EDITORS.FILTER} - - {:else if currentSnippetEditor === SNIPPET_EDITORS.REDUCE} - - {/if} - - Save - Delete + + + Delete + + Save + diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte index e81659f716..35b9563a03 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateUser.svelte @@ -52,7 +52,7 @@ } footer { padding: 20px; - background: #fafafa; + background: var(--grey-light); border-radius: 0.5rem; }