diff --git a/src/client/pages/room/room.vue b/src/client/pages/room/room.vue
index 2dd221ddf..6ede771c5 100644
--- a/src/client/pages/room/room.vue
+++ b/src/client/pages/room/room.vue
@@ -16,7 +16,7 @@
{{ k }}
- {{ $t('_rooms.chooseImage') }}
+ {{ $t('_rooms.chooseImage') }}
@@ -69,6 +69,7 @@ import { faSave, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import { query as urlQuery } from '../../../prelude/url';
import MkButton from '../../components/ui/button.vue';
import MkSelect from '../../components/ui/select.vue';
+import { selectFile } from '../../scripts/select-file';
let room: Room;
@@ -224,10 +225,8 @@ export default Vue.extend({
});
},
- chooseImage(key) {
- this.$chooseDriveFile({
- multiple: false
- }).then(file => {
+ chooseImage(key, e) {
+ selectFile(this, e.currentTarget || e.target, null, false).then(file => {
room.updateProp(key, `/proxy/?${urlQuery({ url: file.thumbnailUrl })}`);
this.$refs.preview.selected(room.getSelectedObject());
this.changed = true;
diff --git a/src/client/scripts/select-file.ts b/src/client/scripts/select-file.ts
index 70e68e88c..65232d3da 100644
--- a/src/client/scripts/select-file.ts
+++ b/src/client/scripts/select-file.ts
@@ -51,6 +51,7 @@ export function selectFile(component: any, src: any, label: string | null, multi
});
};
+ // TODO
const chooseFileFromUrl = () => {
};