fix(frontend): replace share delete confirm with in-app modal

This commit is contained in:
2026-02-18 22:48:31 +08:00
parent fd236e6949
commit bb8a4ea386
2 changed files with 110 additions and 7 deletions

View File

@@ -2364,6 +2364,27 @@
</div>
</div>
<!-- 删除确认模态框(替代浏览器 confirm避免误删 -->
<div v-if="showDeleteConfirmModal" class="modal-overlay" @mousedown.self="handleModalMouseDown" @mouseup.self="handleModalMouseUp('showDeleteConfirmModal', $event)">
<div class="modal-content" @click.stop style="max-width: 440px;">
<h3 style="margin-bottom: 12px; color: #ef4444;">
<i class="fas fa-triangle-exclamation"></i> {{ deleteConfirm.title || '确认删除' }}
</h3>
<p style="margin: 0; color: var(--text-secondary); line-height: 1.7;">
{{ deleteConfirm.message || '确认执行删除操作?' }}
</p>
<div style="display: flex; gap: 10px; margin-top: 20px;">
<button class="btn btn-secondary" @click="closeDeleteConfirmModal()" :disabled="deleteConfirm.loading" style="flex: 1;">
<i class="fas fa-times"></i> 取消
</button>
<button class="btn" style="background: #ef4444; color: white; flex: 1;" @click="confirmDeleteAction()" :disabled="deleteConfirm.loading">
<i class="fas" :class="deleteConfirm.loading ? 'fa-spinner fa-spin' : 'fa-trash'"></i>
{{ deleteConfirm.loading ? '删除中...' : '确定删除' }}
</button>
</div>
</div>
</div>
<!-- OSS 配置引导弹窗 -->
<div v-if="showOssGuideModal" class="modal-overlay" @mousedown.self="handleModalMouseDown" @mouseup.self="handleModalMouseUp('showOssGuideModal', $event)">
<div class="modal-content" @click.stop style="max-width: 520px; border-radius: 16px; overflow: hidden;">
@@ -3057,7 +3078,7 @@
<button class="btn btn-secondary" @click.stop="copyShareLink(share.share_url)">
<i class="fas fa-copy"></i> 复制链接
</button>
<button class="btn share-card__delete-btn" style="background: #ef4444; color: white;" @click.stop="deleteShare(share.id)">
<button class="btn share-card__delete-btn" style="background: #ef4444; color: white;" @click.stop="requestDeleteShare(share.id, $event)">
<i class="fas fa-trash"></i> 删除
</button>
</div>
@@ -3096,7 +3117,7 @@
<button class="btn btn-secondary" @click.stop="copyShareLink(share.share_url)">
<i class="fas fa-copy"></i> 复制链接
</button>
<button class="btn" style="background: #ef4444; color: white;" @click.stop="deleteShare(share.id)">
<button class="btn" style="background: #ef4444; color: white;" @click.stop="requestDeleteShare(share.id, $event)">
<i class="fas fa-trash"></i> 删除
</button>
</div>
@@ -3154,7 +3175,7 @@
<button class="btn btn-secondary" @click.stop="copyDirectLink(link.direct_url)">
<i class="fas fa-copy"></i> 复制链接
</button>
<button class="btn" style="background: #ef4444; color: white;" @click.stop="deleteDirectLink(link.id)">
<button class="btn" style="background: #ef4444; color: white;" @click.stop="requestDeleteDirectLink(link.id, $event)">
<i class="fas fa-trash"></i> 删除
</button>
</div>