ADMIN: Added track management
Build and Publish / Build and Publish Docker Image (push) Successful in 3m5s

This commit is contained in:
2026-05-29 01:13:04 +03:00
parent 1bb5a2f973
commit 66bb127d43
7 changed files with 97 additions and 60 deletions
+10 -2
View File
@@ -1934,7 +1934,7 @@ tbody tr:hover {
<div class="empty" x-show="editorLoading">Loading editor...</div>
<div x-show="!editorLoading">
<div class="field">
<label x-text="isArtistEditor() ? 'Artist name' : 'Title'"></label>
<label x-text="isArtistEditor() ? 'Artist name' : (isReleaseEditor() ? 'Release title' : (isTrackEditor() ? 'Track title' : 'Title'))"></label>
<input x-model="editorDraft.title" />
</div>
@@ -2829,8 +2829,10 @@ function adminV2() {
selectEditorRelease(release = null) {
const candidates = this.filteredEditorReleases();
release = release || candidates[0];
if (release) this.editorDraft.release_id = Number(release.id);
if (!release) return false;
this.editorDraft.release_id = Number(release.id);
this.editorReleaseToAdd = '';
return true;
},
setEditorImageFile(event) {
@@ -2948,6 +2950,12 @@ function adminV2() {
},
async saveLibraryItem() {
if (this.isTrackEditor() && String(this.editorReleaseToAdd || '').trim()) {
if (!this.selectEditorRelease()) {
this.showToast('Choose a release from search results');
return;
}
}
if (!this.editorCanSave()) return;
this.editorSaving = true;
try {