ui: delete confirm shows #id + truncated title (30 chars)
This commit is contained in:
@@ -428,7 +428,8 @@ async function downloadAuth(v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function deleteVideo(v) {
|
async function deleteVideo(v) {
|
||||||
if (!confirm(`Delete "${v.title}"?`)) return
|
const shortTitle = v.title && v.title.length > 30 ? v.title.slice(0, 30) + '…' : (v.title || 'Untitled')
|
||||||
|
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() })
|
||||||
fetchVideos(); fetchStats()
|
fetchVideos(); fetchStats()
|
||||||
|
|||||||
Reference in New Issue
Block a user