refactor: remove Edit Metadata right-click option
Removes the Edit Metadata feature from the anime context menu and
deletes all related backend/frontend code:
Backend:
- DELETE PUT /api/anime/{anime_key} endpoint
- DELETE AnimeMetadataUpdate model and KEY_PATTERN regex
- DELETE MAX_INPUT_LENGTH constant
Frontend:
- DELETE edit-modal.js component
- DELETE edit metadata modal HTML from index.html
- DELETE edit-modal.js script tag
- DELETE edit-only CSS (.edit-modal-content, .edit-section,
.field-error, .input-error, .key-warning, .info-grid,
.info-item, .input-with-action, .btn-fetch-tmdb, .tmdb-*)
- REMOVE 'Edit Metadata' item from context menu (NFO Diagnostics
preserved)
Tests:
- DELETE test_anime_edit_endpoints.py
- DELETE test_edit_modal.py
- DELETE test_anime_key_rename.py
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
* AniWorld - Context Menu Component
|
||||
*
|
||||
* Right-click context menu for anime series cards.
|
||||
* Provides quick access to edit metadata.
|
||||
* Provides quick access to NFO diagnostics.
|
||||
*
|
||||
* Dependencies: ui-utils.js, edit-modal.js
|
||||
* Dependencies: ui-utils.js
|
||||
*/
|
||||
|
||||
var AniWorld = window.AniWorld || {};
|
||||
@@ -67,10 +67,6 @@ AniWorld.ContextMenu = (function() {
|
||||
menuElement = document.createElement('div');
|
||||
menuElement.className = 'context-menu';
|
||||
menuElement.innerHTML = `
|
||||
<div class="context-menu-item" data-action="edit">
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
<span>Edit Metadata</span>
|
||||
</div>
|
||||
<div class="context-menu-item" data-action="nfo-diagnostics">
|
||||
<i class="fa-solid fa-file-circle-check"></i>
|
||||
<span>NFO Diagnostics</span>
|
||||
@@ -100,13 +96,6 @@ AniWorld.ContextMenu = (function() {
|
||||
menuElement.style.top = posY + 'px';
|
||||
|
||||
// Attach action handlers
|
||||
menuElement.querySelector('[data-action="edit"]').addEventListener('click', function() {
|
||||
hide();
|
||||
if (AniWorld.EditModal) {
|
||||
AniWorld.EditModal.open(currentSeriesKey);
|
||||
}
|
||||
});
|
||||
|
||||
// NFO Diagnostics - opens the full NFO settings page
|
||||
menuElement.querySelector('[data-action="nfo-diagnostics"]').addEventListener('click', function() {
|
||||
hide();
|
||||
|
||||
Reference in New Issue
Block a user