fix(album): removing images does not work on mobile

This commit is contained in:
2025-06-02 14:22:35 -04:00
parent 4cdde61a47
commit 19d2c1d4c3

View File

@@ -18,7 +18,8 @@
<input type="file" ref="fileInput" @change="handleFileUpload" accept="image/*" multiple class="hidden" /> <input type="file" ref="fileInput" @change="handleFileUpload" accept="image/*" multiple class="hidden" />
<!-- Photos grid --> <!-- Photos grid -->
<draggable v-model="localImages" class="photos-grid" item-key="id" @end="handleReorder"> <draggable v-model="localImages" class="photos-grid" item-key="id" @end="handleReorder" :filter="'.action-btn'"
:prevent-on-filter="false">
<template #item="{ element, index }"> <template #item="{ element, index }">
<div class="photo-wrapper"> <div class="photo-wrapper">
<div class="index-bubble">{{ index + 1 }}</div> <div class="index-bubble">{{ index + 1 }}</div>
@@ -34,17 +35,18 @@
<span class="mt-2 text-sm text-white">{{ t('uploading') }}</span> <span class="mt-2 text-sm text-white">{{ t('uploading') }}</span>
</div> </div>
<!-- Left arrow --> <!-- Left arrow -->
<button @click.stop="moveImage(index, 'up')" class="action-btn left-btn" :disabled="index === 0" <button @click.stop="moveImage(index, 'up')" @touchstart.stop="moveImage(index, 'up')"
:title="t('moveLeft')"> class="action-btn left-btn" :disabled="index === 0" :title="t('moveLeft')">
<v-icon>mdi-arrow-left</v-icon> <v-icon>mdi-arrow-left</v-icon>
</button> </button>
<!-- Right arrow --> <!-- Right arrow -->
<button @click.stop="moveImage(index, 'down')" class="action-btn right-btn" <button @click.stop="moveImage(index, 'down')" @touchstart.stop="moveImage(index, 'down')"
:disabled="index === localImages.length - 1" :title="t('moveRight')"> class="action-btn right-btn" :disabled="index === localImages.length - 1" :title="t('moveRight')">
<v-icon>mdi-arrow-right</v-icon> <v-icon>mdi-arrow-right</v-icon>
</button> </button>
<!-- Delete button --> <!-- Delete button -->
<button @click.stop="deleteImage(index)" class="action-btn delete-btn" :title="t('delete')"> <button @click.stop="deleteImage(index)" touchstart.stop="deleteImage(index)" class="action-btn delete-btn"
:title="t('delete')">
<v-icon>mdi-delete</v-icon> <v-icon>mdi-delete</v-icon>
</button> </button>
</div> </div>