From 6e9c238054e0aa82e62c837fff0b2b87a6269671 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 24 Sep 2020 15:50:51 +0100 Subject: [PATCH] use bbui component for dropzone --- packages/builder/package.json | 2 +- .../src/components/common/Dropzone.svelte | 284 +----------------- packages/builder/yarn.lock | 8 +- packages/standard-components/package.json | 2 +- .../src/attachments/Dropzone.svelte | 282 +---------------- 5 files changed, 22 insertions(+), 556 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 524025ba5b..33071aff67 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.33.0", + "@budibase/bbui": "^1.34.6", "@budibase/client": "^0.1.21", "@budibase/colorpicker": "^1.0.1", "@fortawesome/fontawesome-free": "^5.14.0", diff --git a/packages/builder/src/components/common/Dropzone.svelte b/packages/builder/src/components/common/Dropzone.svelte index 0af4aa5ffd..53cd606143 100644 --- a/packages/builder/src/components/common/Dropzone.svelte +++ b/packages/builder/src/components/common/Dropzone.svelte @@ -1,40 +1,20 @@ -
- - - - -
- - + diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index e2ed2a824c..f640e80567 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -688,10 +688,10 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@budibase/bbui@^1.33.0": - version "1.33.0" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.33.0.tgz#216b24dd815f45880e9795e66b04848329b0390f" - integrity sha512-Rrt5eLbea014TIfAbT40kP0D0AWNUi8Q0kDr3UZO6Aq4UXgjc0f53ZuJ7Kb66YRDWrqiucjf1FtvOUs3/YaD6g== +"@budibase/bbui@^1.34.6": + version "1.34.6" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.34.6.tgz#d94a9c0af52244ded20dfcd7c93dbd6b184460dc" + integrity sha512-FLYKst1WDjQWpZPOm5w31M5mpdc4FZaHNT5UPyE+LTOtVJquUPycyS1Y/lhGjt/QjwP/Gn8wSvwwsD0gCNJvvg== dependencies: sirv-cli "^0.4.6" svelte-flatpickr "^2.4.0" diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 494a86f2ee..5b3cc17cd7 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -36,7 +36,7 @@ "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": { "@beyonk/svelte-googlemaps": "^2.2.0", - "@budibase/bbui": "^1.32.0", + "@budibase/bbui": "^1.34.6", "@fortawesome/fontawesome-free": "^5.14.0", "britecharts": "^2.16.1", "d3-selection": "^1.4.2", diff --git a/packages/standard-components/src/attachments/Dropzone.svelte b/packages/standard-components/src/attachments/Dropzone.svelte index 5d443b2674..9d68c920c2 100644 --- a/packages/standard-components/src/attachments/Dropzone.svelte +++ b/packages/standard-components/src/attachments/Dropzone.svelte @@ -1,26 +1,16 @@ -
-
    - {#if selectedImage} -
  • -
    -
    - - {selectedImage.name} -
    -

    - {#if selectedImage.size <= BYTES_IN_MB} - {selectedImage.size / BYTES_IN_KB}KB - {:else}{selectedImage.size / BYTES_IN_MB}MB{/if} -

    -
    -
    - -
    - {#if selectedImageIdx !== 0} - - {/if} - - {#if selectedImageIdx !== files.length - 1} - - {/if} -
  • - {/if} -
- - - -
- - +