From 919412df8c5fb41ce832ad1ae560bc78800a971d Mon Sep 17 00:00:00 2001 From: Joe <49767913+joebudi@users.noreply.github.com> Date: Thu, 25 Jun 2020 16:02:30 +0100 Subject: [PATCH] Formatting --- .../src/components/common/NumberBox.svelte | 2 +- .../src/components/common/ValuesList.svelte | 9 +++--- .../ModelDataTable/ModelDataTable.svelte | 5 +--- .../modals/CreateEditRecord.svelte | 1 - .../ComponentPropertiesPanel.svelte | 29 +++++++++++-------- .../userInterface/ComponentsHierarchy.svelte | 2 +- .../ComponentsHierarchyChildren.svelte | 2 +- .../EventsEditor/StateBindingCascader.svelte | 4 +-- .../userInterface/SettingsView.svelte | 26 ++++++++++------- .../workflow/SetupPanel/SetupPanel.svelte | 6 +++- packages/standard-components/src/Login.svelte | 5 +++- 11 files changed, 52 insertions(+), 39 deletions(-) diff --git a/packages/builder/src/components/common/NumberBox.svelte b/packages/builder/src/components/common/NumberBox.svelte index 9a1916b714..8a38f8a0d2 100644 --- a/packages/builder/src/components/common/NumberBox.svelte +++ b/packages/builder/src/components/common/NumberBox.svelte @@ -32,6 +32,6 @@ label { font-size: 14px; font-weight: 500; - margin-bottom: 8px + margin-bottom: 8px; } diff --git a/packages/builder/src/components/common/ValuesList.svelte b/packages/builder/src/components/common/ValuesList.svelte index 08c515ca71..f27bf4cf82 100644 --- a/packages/builder/src/components/common/ValuesList.svelte +++ b/packages/builder/src/components/common/ValuesList.svelte @@ -23,7 +23,6 @@ diff --git a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte index 8638c8c63f..85ffa58a6a 100644 --- a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte @@ -86,9 +86,7 @@

{$backendUiStore.selectedModel.name}

@@ -206,5 +204,4 @@ display: flex; align-items: center; } - diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte index e5a764b8cc..3db48eab34 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte @@ -142,7 +142,6 @@ background: var(--grey-1); border-bottom-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; - } .button-margin-3 { diff --git a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte index 0850125de1..38e4dd67a9 100644 --- a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte +++ b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte @@ -30,7 +30,10 @@ let selectedCategory = categories[0] $: components = $store.components - $: componentInstance = $store.currentView !== "component" ? {...$store.currentPreviewItem, ...$store.currentComponentInfo} : $store.currentComponentInfo + $: componentInstance = + $store.currentView !== "component" + ? { ...$store.currentPreviewItem, ...$store.currentComponentInfo } + : $store.currentComponentInfo $: componentDefinition = $store.components[componentInstance._component] $: componentPropDefinition = flattenedPanel.find( @@ -46,18 +49,21 @@ const onStyleChanged = store.setComponentStyle - function onPropChanged(key, value) { - if($store.currentView !== "component") { + function onPropChanged(key, value) { + if ($store.currentView !== "component") { store.setPageOrScreenProp(key, value) return } store.setComponentProp(key, value) } - $: isComponentOrScreen = $store.currentView === "component" || $store.currentFrontEndType === "screen" + $: isComponentOrScreen = + $store.currentView === "component" || + $store.currentFrontEndType === "screen" $: isNotScreenslot = componentInstance._component !== "##builtin/screenslot" - $: displayName = isComponentOrScreen && componentInstance._instanceName && isNotScreenslot + $: displayName = + isComponentOrScreen && componentInstance._instanceName && isNotScreenslot function walkProps(component, action) { action(component) @@ -92,11 +98,11 @@ {categories} {selectedCategory} /> - {#if displayName} -
- {componentInstance._instanceName} -
- {/if} + {#if displayName} +
+ {componentInstance._instanceName} +
+ {/if}
{#if selectedCategory.value === 'design'} @@ -108,8 +114,7 @@ {panelDefinition} displayNameField={displayName} onChange={onPropChanged} - screenOrPageInstance={$store.currentView !== "component" && $store.currentPreviewItem} /> - + screenOrPageInstance={$store.currentView !== 'component' && $store.currentPreviewItem} /> {:else if selectedCategory.value === 'events'} {/if} diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index c5c6afe063..6de3fe11c2 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -7,7 +7,7 @@ import { store } from "builderStore" import { ArrowDownIcon, ShapeIcon } from "components/common/Icons/" - export let screens = [] + export let screens = [] let confirmDeleteDialog let componentToDelete = "" diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte index cf03861fb9..2a01968881 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte @@ -43,7 +43,7 @@ style="padding-left: {level * 20 + 40}px">
diff --git a/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte b/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte index b9f761cec7..872ad16525 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte @@ -8,7 +8,7 @@ import { EVENT_TYPE_MEMBER_NAME } from "components/common/eventHandlers" import { store, workflowStore } from "builderStore" import { ArrowDownIcon } from "components/common/Icons/" - import { createEventDispatcher } from 'svelte' + import { createEventDispatcher } from "svelte" export let parameter @@ -26,7 +26,7 @@ {/if} {#if parameter.name === 'workflow'} + {/each}
diff --git a/packages/standard-components/src/Login.svelte b/packages/standard-components/src/Login.svelte index 0675c65f46..d09cd0ff2b 100644 --- a/packages/standard-components/src/Login.svelte +++ b/packages/standard-components/src/Login.svelte @@ -23,7 +23,10 @@ const login = async () => { loading = true - const response = await _bb.api.post("/api/authenticate", { username, password }) + const response = await _bb.api.post("/api/authenticate", { + username, + password, + }) if (response.status === 200) { const json = await response.json() localStorage.setItem("budibase:token", json.token)