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);
|
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;">
|
<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>
|
<span style="font-weight: 600; color: var(--primary);">+ Create New Playlist</span>
|
||||||
</div>
|
</div>
|
||||||
` + playlists
|
` +
|
||||||
.map(
|
playlists
|
||||||
(p) => `
|
.map(
|
||||||
|
(p) => `
|
||||||
<div class="modal-option" data-id="${p.id}">
|
<div class="modal-option" data-id="${p.id}">
|
||||||
<span>${p.name}</span>
|
<span>${p.name}</span>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
modal.classList.remove('active');
|
modal.classList.remove('active');
|
||||||
|
|
@ -1024,10 +1026,10 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
document.getElementById('playlist-cover-input').value = '';
|
document.getElementById('playlist-cover-input').value = '';
|
||||||
createModal.dataset.editingId = '';
|
createModal.dataset.editingId = '';
|
||||||
document.getElementById('csv-import-section').style.display = 'none'; // Hide CSV for simple add
|
document.getElementById('csv-import-section').style.display = 'none'; // Hide CSV for simple add
|
||||||
|
|
||||||
// Pass tracks
|
// Pass tracks
|
||||||
createModal._pendingTracks = tracks;
|
createModal._pendingTracks = tracks;
|
||||||
|
|
||||||
createModal.classList.add('active');
|
createModal.classList.add('active');
|
||||||
document.getElementById('playlist-name-input').focus();
|
document.getElementById('playlist-name-input').focus();
|
||||||
return;
|
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;">
|
<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>
|
<span style="font-weight: 600; color: var(--primary);">+ Create New Playlist</span>
|
||||||
</div>
|
</div>
|
||||||
` + playlists
|
` +
|
||||||
.map((p) => {
|
playlists
|
||||||
const alreadyContains = playlistsWithTrack.has(p.id);
|
.map((p) => {
|
||||||
return `
|
const alreadyContains = playlistsWithTrack.has(p.id);
|
||||||
|
return `
|
||||||
<div class="modal-option ${alreadyContains ? 'already-contains' : ''}" data-id="${p.id}">
|
<div class="modal-option ${alreadyContains ? 'already-contains' : ''}" data-id="${p.id}">
|
||||||
<span>${p.name}</span>
|
<span>${p.name}</span>
|
||||||
${
|
${
|
||||||
|
|
@ -860,8 +862,8 @@ export async function handleTrackAction(
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
})
|
})
|
||||||
.join('');
|
.join('');
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -886,10 +888,10 @@ export async function handleTrackAction(
|
||||||
document.getElementById('playlist-cover-input').value = '';
|
document.getElementById('playlist-cover-input').value = '';
|
||||||
createModal.dataset.editingId = '';
|
createModal.dataset.editingId = '';
|
||||||
document.getElementById('csv-import-section').style.display = 'none';
|
document.getElementById('csv-import-section').style.display = 'none';
|
||||||
|
|
||||||
// Pass track
|
// Pass track
|
||||||
createModal._pendingTracks = [item];
|
createModal._pendingTracks = [item];
|
||||||
|
|
||||||
createModal.classList.add('active');
|
createModal.classList.add('active');
|
||||||
document.getElementById('playlist-name-input').focus();
|
document.getElementById('playlist-name-input').focus();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue