style: auto-fix linting issues
This commit is contained in:
parent
758d1ffd6f
commit
f0fd8c8c9e
2 changed files with 21 additions and 17 deletions
18
js/app.js
18
js/app.js
|
|
@ -993,19 +993,21 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
|
||||
const playlists = await db.getPlaylists(false);
|
||||
|
||||
list.innerHTML = `
|
||||
list.innerHTML =
|
||||
`
|
||||
<div class="modal-option create-new-option" style="border-bottom: 1px solid var(--border); margin-bottom: 0.5rem;">
|
||||
<span style="font-weight: 600; color: var(--primary);">+ Create New Playlist</span>
|
||||
</div>
|
||||
` + playlists
|
||||
.map(
|
||||
(p) => `
|
||||
` +
|
||||
playlists
|
||||
.map(
|
||||
(p) => `
|
||||
<div class="modal-option" data-id="${p.id}">
|
||||
<span>${p.name}</span>
|
||||
</div>
|
||||
`
|
||||
)
|
||||
.join('');
|
||||
)
|
||||
.join('');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
|
|
@ -1024,10 +1026,10 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
document.getElementById('playlist-cover-input').value = '';
|
||||
createModal.dataset.editingId = '';
|
||||
document.getElementById('csv-import-section').style.display = 'none'; // Hide CSV for simple add
|
||||
|
||||
|
||||
// Pass tracks
|
||||
createModal._pendingTracks = tracks;
|
||||
|
||||
|
||||
createModal.classList.add('active');
|
||||
document.getElementById('playlist-name-input').focus();
|
||||
return;
|
||||
|
|
|
|||
20
js/events.js
20
js/events.js
|
|
@ -843,14 +843,16 @@ export async function handleTrackAction(
|
|||
}
|
||||
}
|
||||
|
||||
list.innerHTML = `
|
||||
list.innerHTML =
|
||||
`
|
||||
<div class="modal-option create-new-option" style="border-bottom: 1px solid var(--border); margin-bottom: 0.5rem;">
|
||||
<span style="font-weight: 600; color: var(--primary);">+ Create New Playlist</span>
|
||||
</div>
|
||||
` + playlists
|
||||
.map((p) => {
|
||||
const alreadyContains = playlistsWithTrack.has(p.id);
|
||||
return `
|
||||
` +
|
||||
playlists
|
||||
.map((p) => {
|
||||
const alreadyContains = playlistsWithTrack.has(p.id);
|
||||
return `
|
||||
<div class="modal-option ${alreadyContains ? 'already-contains' : ''}" data-id="${p.id}">
|
||||
<span>${p.name}</span>
|
||||
${
|
||||
|
|
@ -860,8 +862,8 @@ export async function handleTrackAction(
|
|||
}
|
||||
</div>
|
||||
`;
|
||||
})
|
||||
.join('');
|
||||
})
|
||||
.join('');
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
@ -886,10 +888,10 @@ export async function handleTrackAction(
|
|||
document.getElementById('playlist-cover-input').value = '';
|
||||
createModal.dataset.editingId = '';
|
||||
document.getElementById('csv-import-section').style.display = 'none';
|
||||
|
||||
|
||||
// Pass track
|
||||
createModal._pendingTracks = [item];
|
||||
|
||||
|
||||
createModal.classList.add('active');
|
||||
document.getElementById('playlist-name-input').focus();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue