From f3b8a3247e6983c20f4c64acf18e9231871453f0 Mon Sep 17 00:00:00 2001 From: jedi Date: Mon, 17 Jul 2023 15:53:26 +0200 Subject: [PATCH] stash --- frontend/src/components/CameraFileSource.vue | 76 ++++++++ frontend/src/components/CombinedFileField.vue | 170 ++++++++---------- .../src/components/DragDropFileSource.vue | 88 +++++++++ frontend/src/components/FsFileSource.vue | 59 ++++++ frontend/src/store.js | 2 +- frontend/src/views/InventoryDetail.vue | 4 +- frontend/src/views/InventoryEdit.vue | 15 +- frontend/src/views/InventoryNew.vue | 13 +- 8 files changed, 322 insertions(+), 105 deletions(-) create mode 100644 frontend/src/components/CameraFileSource.vue create mode 100644 frontend/src/components/DragDropFileSource.vue create mode 100644 frontend/src/components/FsFileSource.vue diff --git a/frontend/src/components/CameraFileSource.vue b/frontend/src/components/CameraFileSource.vue new file mode 100644 index 0000000..5a93a89 --- /dev/null +++ b/frontend/src/components/CameraFileSource.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/components/CombinedFileField.vue b/frontend/src/components/CombinedFileField.vue index ef678f7..06ee839 100644 --- a/frontend/src/components/CombinedFileField.vue +++ b/frontend/src/components/CombinedFileField.vue @@ -1,33 +1,33 @@ \ No newline at end of file diff --git a/frontend/src/components/DragDropFileSource.vue b/frontend/src/components/DragDropFileSource.vue new file mode 100644 index 0000000..6646ef5 --- /dev/null +++ b/frontend/src/components/DragDropFileSource.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/components/FsFileSource.vue b/frontend/src/components/FsFileSource.vue new file mode 100644 index 0000000..29bff9a --- /dev/null +++ b/frontend/src/components/FsFileSource.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/store.js b/frontend/src/store.js index 36d06dc..9eb157f 100644 --- a/frontend/src/store.js +++ b/frontend/src/store.js @@ -253,7 +253,7 @@ export default createStore({ async pushFile({state, dispatch, getters}, {item_id, file}) { const servers = await dispatch('getHomeServers') const data = await servers.post(getters.signAuth, '/api/item_files/'+item_id+'/', file) - if (data.mime_type) { + if (data.hash) { state.files.push(data) return data } diff --git a/frontend/src/views/InventoryDetail.vue b/frontend/src/views/InventoryDetail.vue index c0d4f8b..40dcd98 100644 --- a/frontend/src/views/InventoryDetail.vue +++ b/frontend/src/views/InventoryDetail.vue @@ -36,10 +36,10 @@
- +