ui: delete confirm truncate title to 20 chars

This commit is contained in:
mini
2026-02-19 01:03:59 +08:00
parent b1f705f007
commit b58d62f745

View File

@@ -428,7 +428,7 @@ async function downloadAuth(v) {
} }
async function deleteVideo(v) { async function deleteVideo(v) {
const shortTitle = v.title && v.title.length > 30 ? v.title.slice(0, 30) + '…' : (v.title || 'Untitled') const shortTitle = v.title && v.title.length > 20 ? v.title.slice(0, 20) + '…' : (v.title || 'Untitled')
if (!confirm(`Delete #${v.id} "${shortTitle}"?`)) return if (!confirm(`Delete #${v.id} "${shortTitle}"?`)) return
try { try {
await axios.delete(`/api/admin/videos/${v.id}`, { headers: auth.getHeaders() }) await axios.delete(`/api/admin/videos/${v.id}`, { headers: auth.getHeaders() })