From f5becf920b577f39b3db8d3fcb19fa478fed0a64 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 24 Feb 2020 15:00:48 +0000 Subject: [PATCH 1/2] style abstraction --- packages/builder/src/App.svelte | 16 +++- .../src/accessLevels/AccessLevelView.svelte | 9 +- .../src/accessLevels/AccessLevelsRoot.svelte | 6 +- .../src/actionsAndTriggers/ActionView.svelte | 40 +++++---- .../src/actionsAndTriggers/Actions.svelte | 7 +- .../ActionsAndTriggersRoot.svelte | 10 ++- .../src/actionsAndTriggers/TriggerView.svelte | 17 ++-- .../src/actionsAndTriggers/Triggers.svelte | 2 +- .../builder/src/common/ActionButton.svelte | 6 +- .../builder/src/common/ButtonGroup.svelte | 17 +--- packages/builder/src/common/CodeArea.svelte | 2 +- .../builder/src/common/ConfirmDialog.svelte | 64 +++++++------- packages/builder/src/common/Dropdown.svelte | 9 +- .../builder/src/common/DropdownButton.svelte | 2 +- packages/builder/src/common/Modal.svelte | 1 + packages/builder/src/common/Spinner.svelte | 5 ++ packages/builder/src/common/Textbox.svelte | 2 +- .../builder/src/database/ActionsHeader.svelte | 26 ++++-- .../builder/src/database/FieldView.svelte | 23 +++-- .../builder/src/database/RecordView.svelte | 15 +--- packages/builder/src/global.css | 87 +++++++++++++++++++ packages/builder/src/nav/BackendNav.svelte | 4 +- packages/builder/src/nav/HierarchyRow.svelte | 38 ++------ packages/builder/src/nav/NavItem.svelte | 22 +---- .../userInterface/ComponentsHierarchy.svelte | 23 +---- .../ComponentsHierarchyChildren.svelte | 9 +- .../EventsEditor/EventsEditor.svelte | 29 +++---- .../src/userInterface/MasterLayout.svelte | 36 ++------ 28 files changed, 260 insertions(+), 267 deletions(-) create mode 100644 packages/builder/src/common/Spinner.svelte diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 87a83463a2..230aa17179 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -5,6 +5,7 @@ import { store, initialise } from "./builderStore" import { onMount } from "svelte" import IconButton from "./common/IconButton.svelte" + import Spinner from "./common/Spinner.svelte" let init = initialise() @@ -12,9 +13,9 @@
{#await init} - -

loading

- +
+ +
{:then result} {#if $store.hasAppPackage} @@ -52,4 +53,13 @@ bottom: 25px; right: 25px; } + + .spinner-container { + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + } + diff --git a/packages/builder/src/accessLevels/AccessLevelView.svelte b/packages/builder/src/accessLevels/AccessLevelView.svelte index 76a57718c0..ec91977b00 100644 --- a/packages/builder/src/accessLevels/AccessLevelView.svelte +++ b/packages/builder/src/accessLevels/AccessLevelView.svelte @@ -4,6 +4,7 @@ import Checkbox from "../common/Checkbox.svelte" import ButtonGroup from "../common/ButtonGroup.svelte" import Button from "../common/Button.svelte" + import ActionButton from "../common/ActionButton.svelte" import { validateAccessLevels } from "../common/core" import ErrorsBox from "../common/ErrorsBox.svelte" @@ -64,7 +65,7 @@
- + {#each permissionMatrix as permission}
@@ -78,10 +79,10 @@ - - +
diff --git a/packages/builder/src/accessLevels/AccessLevelsRoot.svelte b/packages/builder/src/accessLevels/AccessLevelsRoot.svelte index c7fe19abf3..837749e6d9 100644 --- a/packages/builder/src/accessLevels/AccessLevelsRoot.svelte +++ b/packages/builder/src/accessLevels/AccessLevelsRoot.svelte @@ -1,6 +1,7 @@
- - + {#if $store.accessLevels} diff --git a/packages/builder/src/actionsAndTriggers/ActionView.svelte b/packages/builder/src/actionsAndTriggers/ActionView.svelte index d6f5b5b518..a8e29d49aa 100644 --- a/packages/builder/src/actionsAndTriggers/ActionView.svelte +++ b/packages/builder/src/actionsAndTriggers/ActionView.svelte @@ -1,6 +1,7 @@ -

Actions

+

Actions

{#if actionsArray} @@ -99,11 +99,6 @@ color: var(--secondary75); } - .title { - margin: 3rem 0rem 0rem 0rem; - font-weight: 700; - } - .table-content { font-weight: 500; font-size: 0.9rem; diff --git a/packages/builder/src/actionsAndTriggers/ActionsAndTriggersRoot.svelte b/packages/builder/src/actionsAndTriggers/ActionsAndTriggersRoot.svelte index 696531a4db..09d198148f 100644 --- a/packages/builder/src/actionsAndTriggers/ActionsAndTriggersRoot.svelte +++ b/packages/builder/src/actionsAndTriggers/ActionsAndTriggersRoot.svelte @@ -2,6 +2,7 @@ import getIcon from "../common/icon" import { store } from "../builderStore" import Button from "../common/Button.svelte" + import ActionButton from "../common/ActionButton.svelte" import ButtonGroup from "../common/ButtonGroup.svelte" import Actions from "./Actions.svelte" import Triggers from "./Triggers.svelte" @@ -83,12 +84,12 @@
- - +
@@ -121,6 +122,7 @@ .actions-header { flex: 0 1 auto; + margin-bottom: 10px; } .node-view { diff --git a/packages/builder/src/actionsAndTriggers/TriggerView.svelte b/packages/builder/src/actionsAndTriggers/TriggerView.svelte index 24f19cff71..df42d0cd16 100644 --- a/packages/builder/src/actionsAndTriggers/TriggerView.svelte +++ b/packages/builder/src/actionsAndTriggers/TriggerView.svelte @@ -1,6 +1,7 @@ -

Triggers

+

Triggers

{#if $store.triggers}
diff --git a/packages/builder/src/common/ActionButton.svelte b/packages/builder/src/common/ActionButton.svelte index 46278e8b6d..e28665c231 100644 --- a/packages/builder/src/common/ActionButton.svelte +++ b/packages/builder/src/common/ActionButton.svelte @@ -29,12 +29,12 @@ } .button { - font-size: 18px; + font-size: 14px; font-weight: bold; border-radius: 5px; border: none; - width: 167px; - height: 64px; + width: 120px; + height: 45px; } .button:hover { diff --git a/packages/builder/src/common/ButtonGroup.svelte b/packages/builder/src/common/ButtonGroup.svelte index 699695bcfd..1010c1c024 100644 --- a/packages/builder/src/common/ButtonGroup.svelte +++ b/packages/builder/src/common/ButtonGroup.svelte @@ -8,18 +8,9 @@ diff --git a/packages/builder/src/common/CodeArea.svelte b/packages/builder/src/common/CodeArea.svelte index 47f563b045..9e8e0eaff6 100644 --- a/packages/builder/src/common/CodeArea.svelte +++ b/packages/builder/src/common/CodeArea.svelte @@ -4,7 +4,7 @@ export let label = "" -
{label}
+
{label}