From 127ce3b59df751795d570e0cf6d91d40aad5a1c2 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Fri, 9 Oct 2020 17:12:55 +0100 Subject: [PATCH] renaming Record > Row --- .../store/screenTemplates/emptyNewRecordScreen.js | 2 +- .../store/screenTemplates/emptyRecordDetailScreen.js | 2 +- .../store/screenTemplates/newRecordScreen.js | 7 +++---- .../store/screenTemplates/recordDetailScreen.js | 7 +++---- .../store/screenTemplates/recordListScreen.js | 2 +- .../EventsEditor/actions/SaveFields.svelte | 2 +- .../src/components/userInterface/NewScreenModal.svelte | 10 ---------- .../userInterface/temporaryPanelStructure.js | 4 ++-- packages/standard-components/components.json | 4 ++-- .../src/{NewRecord.svelte => NewRow.svelte} | 0 .../src/{RecordDetail.svelte => RowDetail.svelte} | 2 +- packages/standard-components/src/index.js | 4 ++-- 12 files changed, 17 insertions(+), 29 deletions(-) rename packages/standard-components/src/{NewRecord.svelte => NewRow.svelte} (100%) rename packages/standard-components/src/{RecordDetail.svelte => RowDetail.svelte} (96%) diff --git a/packages/builder/src/builderStore/store/screenTemplates/emptyNewRecordScreen.js b/packages/builder/src/builderStore/store/screenTemplates/emptyNewRecordScreen.js index 7dfca668a4..a9b73a2cf0 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/emptyNewRecordScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/emptyNewRecordScreen.js @@ -6,7 +6,7 @@ export default { const createScreen = () => ({ props: { _id: "", - _component: "@budibase/standard-components/recorddetail", + _component: "@budibase/standard-components/newrow", _styles: { normal: {}, hover: {}, diff --git a/packages/builder/src/builderStore/store/screenTemplates/emptyRecordDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/emptyRecordDetailScreen.js index 412d8692bb..8a47571288 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/emptyRecordDetailScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/emptyRecordDetailScreen.js @@ -6,7 +6,7 @@ export default { const createScreen = () => ({ props: { _id: "", - _component: "@budibase/standard-components/recorddetail", + _component: "@budibase/standard-components/rowdetail", _styles: { normal: {}, hover: {}, diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRecordScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRecordScreen.js index 3124f0de6f..3c03573f28 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/newRecordScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/newRecordScreen.js @@ -1,10 +1,9 @@ export default function(models) { return models.map(model => { const fields = Object.keys(model.schema) - const heading = - fields.length > 0 ? `{{ data.${fields[0]} }}` : "Create Record" + const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Add Row" return { - name: `New Record - ${model.name}`, + name: `New Row - ${model.name}`, create: () => createScreen(model, heading), id: NEW_RECORD_TEMPLATE, } @@ -16,7 +15,7 @@ export const NEW_RECORD_TEMPLATE = "NEW_RECORD_TEMPLATE" const createScreen = (model, heading) => ({ props: { _id: "", - _component: "@budibase/standard-components/newrecord", + _component: "@budibase/standard-components/newrow", _styles: { normal: {}, hover: {}, diff --git a/packages/builder/src/builderStore/store/screenTemplates/recordDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/recordDetailScreen.js index 0b6374a67b..43c93538b5 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/recordDetailScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/recordDetailScreen.js @@ -1,10 +1,9 @@ export default function(models) { return models.map(model => { const fields = Object.keys(model.schema) - const heading = - fields.length > 0 ? `{{ data.${fields[0]} }}` : "Edit Record" + const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Detail" return { - name: `Record Detail - ${model.name}`, + name: `Row Detail - ${model.name}`, create: () => createScreen(model, heading), id: RECORD_DETAIL_TEMPLATE, } @@ -16,7 +15,7 @@ export const RECORD_DETAIL_TEMPLATE = "RECORD_DETAIL_TEMPLATE" const createScreen = (model, heading) => ({ props: { _id: "", - _component: "@budibase/standard-components/recorddetail", + _component: "@budibase/standard-components/rowdetail", _styles: { normal: {}, hover: {}, diff --git a/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js index 69a2b74f0f..5162df5be2 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js @@ -1,7 +1,7 @@ export default function(models) { return models.map(model => { return { - name: `Record List - ${model.name}`, + name: `List - ${model.name}`, create: () => createScreen(model), id: RECORD_LIST_TEMPLATE, } diff --git a/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte index 5011f8f173..cac4ed761a 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte @@ -73,7 +73,7 @@ {#if fields} {#each fields as field} - +