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:
@@ -312,97 +312,8 @@
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
Edit Metadata Modal
|
||||
NFO Diagnostics
|
||||
============================================================================ */
|
||||
|
||||
.edit-modal-content {
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.edit-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
padding-bottom: var(--spacing-lg);
|
||||
border-bottom: 1px solid var(--color-divider);
|
||||
}
|
||||
|
||||
.edit-section:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.edit-section h4 {
|
||||
margin: 0 0 var(--spacing-md) 0;
|
||||
font-size: var(--font-size-body);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.edit-section h4 i {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: var(--spacing-xs);
|
||||
font-size: var(--font-size-caption);
|
||||
font-weight: 500;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
/* Edit modal specific input sizing */
|
||||
.edit-modal-content .input-field {
|
||||
width: 100%;
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.edit-modal-content .form-group {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.edit-modal-content .form-row .form-group {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.field-error {
|
||||
display: block;
|
||||
margin-top: var(--spacing-xs);
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-error, #e74c3c);
|
||||
}
|
||||
|
||||
.input-error {
|
||||
border-color: var(--color-error, #e74c3c) !important;
|
||||
}
|
||||
|
||||
.key-warning {
|
||||
background: rgba(255, 193, 7, 0.1);
|
||||
border: 1px solid rgba(255, 193, 7, 0.3);
|
||||
border-radius: var(--border-radius);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
margin-top: var(--spacing-sm);
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-warning, #f39c12);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
/* NFO Diagnostics */
|
||||
.nfo-diagnostics {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
@@ -504,101 +415,4 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Series Info Grid (Read-only display) */
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--spacing-sm) var(--spacing-lg);
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.info-item label {
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.info-item .info-value {
|
||||
font-size: var(--font-size-body);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
/* Input with action button */
|
||||
.input-with-action {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-with-action .input-field {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-fetch-tmdb {
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* TMDB Search Results */
|
||||
.tmdb-search-results {
|
||||
margin-top: var(--spacing-sm);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--color-surface);
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.tmdb-result-item {
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid var(--color-divider);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.tmdb-result-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.tmdb-result-item:hover {
|
||||
background: var(--color-background-subtle);
|
||||
}
|
||||
|
||||
.tmdb-result-title {
|
||||
font-weight: 500;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.tmdb-result-overview {
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tmdb-error,
|
||||
.tmdb-no-results,
|
||||
.tmdb-selected {
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-text-secondary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tmdb-error {
|
||||
color: var(--color-error, #e74c3c);
|
||||
}
|
||||
|
||||
.tmdb-selected {
|
||||
color: var(--color-success, #2ecc71);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user