Remove confirmation dialog from delete from disk button
- Remove confirmation prompt from deleteFromDisk function - Remove success alert, just reload page immediately - Streamline deletion workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -104,16 +104,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deleteFromDisk() {
|
function deleteFromDisk() {
|
||||||
if (!confirm('Are you sure you want to delete this video from disk? This cannot be undone.')) return;
|
|
||||||
|
|
||||||
fetch('/api/videos/{{ video.id }}/file', {
|
fetch('/api/videos/{{ video.id }}/file', {
|
||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.status === 'success') {
|
if (data.status === 'success') {
|
||||||
alert('Video deleted from disk! This page will refresh automatically.');
|
location.reload();
|
||||||
setTimeout(() => location.reload(), 2000);
|
|
||||||
} else {
|
} else {
|
||||||
alert('Failed to delete video: ' + data.message);
|
alert('Failed to delete video: ' + data.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user