From 0f862e3c66f79375e1a3dfd85bca1f095bfc2cee Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 13 Oct 2020 09:40:07 +0100 Subject: [PATCH 1/4] Rename datasource prop from table to data for all components --- .../userInterface/temporaryPanelStructure.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 50799581f8..bdf2c62340 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -305,7 +305,7 @@ export default { design: { ...all }, settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, @@ -587,7 +587,7 @@ export default { design: { ...all }, settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, @@ -659,7 +659,7 @@ export default { properties: { settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, @@ -753,7 +753,7 @@ export default { properties: { settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, @@ -867,7 +867,7 @@ export default { properties: { settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, @@ -970,7 +970,7 @@ export default { properties: { settings: [ { - label: "Table", + label: "Data", key: "datasource", control: ModelViewSelect, }, From fa59b05d74e21e0ef712eef2744619b904868e8c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 13 Oct 2020 09:42:44 +0100 Subject: [PATCH 2/4] Add back in sharp reference which was commented out --- packages/server/src/utilities/fileProcessor.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/server/src/utilities/fileProcessor.js b/packages/server/src/utilities/fileProcessor.js index 734209733d..3e580e9e37 100644 --- a/packages/server/src/utilities/fileProcessor.js +++ b/packages/server/src/utilities/fileProcessor.js @@ -1,5 +1,5 @@ const fs = require("fs") -// const sharp = require("sharp") +const sharp = require("sharp") const fsPromises = fs.promises const FORMATS = { @@ -7,14 +7,14 @@ const FORMATS = { } async function processImage(file) { - // const imgMeta = await sharp(file.path) - // .resize(300) - // .toFile(file.outputPath) - // - // return { - // ...file, - // ...imgMeta, - // } + const imgMeta = await sharp(file.path) + .resize(300) + .toFile(file.outputPath) + + return { + ...file, + ...imgMeta, + } } async function process(file) { From 652e3b43ed875e90f28d125b83249b50d9d7521c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 13 Oct 2020 09:47:12 +0100 Subject: [PATCH 3/4] Remove console.log statement --- .../src/components/backend/DataTable/TablePagination.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/TablePagination.svelte b/packages/builder/src/components/backend/DataTable/TablePagination.svelte index 840b3381e5..06916f8497 100644 --- a/packages/builder/src/components/backend/DataTable/TablePagination.svelte +++ b/packages/builder/src/components/backend/DataTable/TablePagination.svelte @@ -24,8 +24,7 @@ } function getPagesAroundCurrent(current, max) { - console.log(current) - const start = Math.max(current - 2, 1) +giat const start = Math.max(current - 2, 1) const end = Math.min(current + 2, max - 2) let pages = [] for (let i = start; i <= end; i++) { From 0aeed3241ea9fd5507a0a42a32f85153bb983a81 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 13 Oct 2020 09:51:43 +0100 Subject: [PATCH 4/4] Remove random text --- .../src/components/backend/DataTable/TablePagination.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/TablePagination.svelte b/packages/builder/src/components/backend/DataTable/TablePagination.svelte index 06916f8497..ccb7d0fc4c 100644 --- a/packages/builder/src/components/backend/DataTable/TablePagination.svelte +++ b/packages/builder/src/components/backend/DataTable/TablePagination.svelte @@ -24,7 +24,7 @@ } function getPagesAroundCurrent(current, max) { -giat const start = Math.max(current - 2, 1) + const start = Math.max(current - 2, 1) const end = Math.min(current + 2, max - 2) let pages = [] for (let i = start; i <= end; i++) {