diff --git a/packages/frontend/src/components/MkPostFormAttaches.vue b/packages/frontend/src/components/MkPostFormAttaches.vue index 2c45e64721..9eee090654 100644 --- a/packages/frontend/src/components/MkPostFormAttaches.vue +++ b/packages/frontend/src/components/MkPostFormAttaches.vue @@ -13,9 +13,9 @@ SPDX-License-Identifier: AGPL-3.0-only @drop.stop >
-
- -
+
+ +
@@ -51,15 +51,14 @@ const emit = defineEmits<{ const dndParentEl = shallowRef(); -const fileKvs = computed(() => Object.fromEntries(props.modelValue.map(file => [file.id, file]))); -const fileIds = computed({ - get: () => props.modelValue.map(file => file.id), - set: (ids: string[]) => emit('update:modelValue', ids.map(id => fileKvs.value[id])), +const files = computed({ + get: () => props.modelValue, + set: (v) => emit('update:modelValue', v), }); dragAndDrop({ parent: dndParentEl, - values: fileIds, + values: files, plugins: [animations()], });