From 9acab69a06fd29f7494401aac9ac0249cf7ea5b0 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 fc870c0dc91b8140f60c0e4276d1793c7af2c7f6 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 2641b781f9b08a273477fd5ff7d6dd263bcbc73a 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 d96293638f16cae184a789d70e3072b509f3b674 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++) {