diff --git a/package-lock.json b/package-lock.json index 8ba5424..0e603a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "@suid/icons-material": "^0.6.0", "@suid/material": "^0.12.0", "@suid/vite-plugin": "^0.1.3", + "blob-util": "^2.0.2", "com-darryncampbell-cordova-plugin-intent": "^2.2.0", "cordova-plugin-fullscreen": "^1.3.0", "isomorphic-xml2js": "^0.1.3", @@ -2658,6 +2659,11 @@ "node": ">=0.6" } }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==" + }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", diff --git a/package.json b/package.json index 9e545af..666f030 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@suid/icons-material": "^0.6.0", "@suid/material": "^0.12.0", "@suid/vite-plugin": "^0.1.3", + "blob-util": "^2.0.2", "com-darryncampbell-cordova-plugin-intent": "^2.2.0", "cordova-plugin-fullscreen": "^1.3.0", "isomorphic-xml2js": "^0.1.3", diff --git a/src/components/import/ImportSingleFile.tsx b/src/components/import/ImportSingleFile.tsx index 910a16e..a66a449 100644 --- a/src/components/import/ImportSingleFile.tsx +++ b/src/components/import/ImportSingleFile.tsx @@ -343,6 +343,7 @@ const ImportSingleFile: Component = ({ file: file }) => { }} coordinate={coordinate} initialWpt={initialWpt} + imageUrl={picture()?.downsizedUrl} /> diff --git a/src/components/wpt/WptEditDialog.tsx b/src/components/wpt/WptEditDialog.tsx index d050b78..dfa1ce1 100644 --- a/src/components/wpt/WptEditDialog.tsx +++ b/src/components/wpt/WptEditDialog.tsx @@ -41,6 +41,7 @@ interface Props { open: () => boolean; closeHandler?: () => void; initialWpt: () => Wpt; + imageUrl?: string | undefined; } const WptEditDialog: Component = (props) => { @@ -50,6 +51,7 @@ const WptEditDialog: Component = (props) => { open, coordinate, initialWpt = () => emptyWpt, + imageUrl, } = props; const [t, { add, locale, dict }] = useI18n();