added delete option
This commit is contained in:
@@ -71,6 +71,11 @@ AniWorld.ContextMenu = (function() {
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
<span>Anime Settings</span>
|
||||
</div>
|
||||
<div class="context-menu-divider"></div>
|
||||
<div class="context-menu-item danger" data-action="delete-anime">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
<span>Delete Anime</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
document.body.appendChild(menuElement);
|
||||
@@ -104,6 +109,17 @@ AniWorld.ContextMenu = (function() {
|
||||
// Navigate to anime settings page with this series selected
|
||||
window.location.href = '/anime/settings?key=' + encodeURIComponent(key);
|
||||
});
|
||||
|
||||
// Delete Anime - opens the confirmation modal
|
||||
menuElement.querySelector('[data-action="delete-anime"]').addEventListener('click', function() {
|
||||
const key = currentSeriesKey;
|
||||
hide();
|
||||
if (AniWorld.DeleteModal && AniWorld.DeleteModal.show) {
|
||||
AniWorld.DeleteModal.show(key);
|
||||
} else {
|
||||
console.error('[ContextMenu] DeleteModal not found on AniWorld');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user