diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afaa6dc..555be51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,9 @@ name: Release +# Fix for broken build: https://github.com/softprops/action-gh-release/issues/236 +permissions: + contents: write + on: push: branches: diff --git a/README.md b/README.md index 54718a5..29526b1 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,8 @@ Take pictures in Budibase! This component allows you to snap a photo directly into an Attachment field in a Budibase DB data source. It's a form field component and it saves the captured image files directly to the attachment column you configure. -## Known issues - -- doesn't currently work in Safari or Firefox. Chromium browsers only supported for now. - ## Todos - add camera selection - add more options (timer, resolution, format, etc.) -- allow photo deletion from field -- wider browser support +- allow photo deletion from the field diff --git a/package.json b/package.json index 5e7cbff..cda2c06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "camera", - "version": "0.7.0", + "version": "0.7.3", "description": "Take pictures in Budibase 📸", "license": "MIT", "svelte": "index.js", @@ -11,6 +11,7 @@ }, "dependencies": { "@crownframework/svelte-error-boundary": "^1.0.3", + "image-capture": "^0.4.0", "svelte": "^3.49.0" }, "devDependencies": { diff --git a/src/Component.svelte b/src/Component.svelte index 7952115..922cc6c 100644 --- a/src/Component.svelte +++ b/src/Component.svelte @@ -2,6 +2,7 @@ import { getContext, onDestroy } from "svelte"; import Captures from "./Captures.svelte"; import Loading from "./Loading.svelte"; + import { ImageCapture } from "image-capture"; export let field; export let label; diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000..5669f71 --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1 @@ +declare module "image-capture"; diff --git a/yarn.lock b/yarn.lock index 08992e2..d72f3f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -665,6 +665,11 @@ icss-utils@^5.0.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +image-capture@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/image-capture/-/image-capture-0.4.0.tgz#67b96608d0b58ecb1337ee335e4492733f6c11ee" + integrity sha512-6RWTfqC4ij0AldG+6sQ51XSHTSbwfqMSjVl1GtwNBzbW4UrcfGZeB1Kn749BccvtLb04g5+jSTf1D7q3qHcxpA== + import-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92"