mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 05:50:52 +02:00
fix playlist multi-line comment display; make it possible to
double-click (re-start) the current track
This commit is contained in:
parent
6cb74abded
commit
e85de87728
1 changed files with 12 additions and 7 deletions
19
index.html
19
index.html
|
|
@ -92,8 +92,8 @@ canvas { width: 100%; height: 100px; border-radius: 6px; display: block; }
|
|||
.track-item .col-title { color: #c6c8d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.track-item .col-artist { color: #6b7089; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.track-item .col-file { color: #6b7089; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.track-item .col-time { color: #6b7089; font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
.track-item .col-genre { color: #6b7089; font-size: 10px; }
|
||||
.track-item .col-time { color: #6b7089; font-size: 11px; font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; }
|
||||
.track-item .col-genre { color: #6b7089; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
||||
footer .footer-track { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
#error { display: none; background: rgba(226,120,120,0.15); color: #e27878; padding: 8px 16px; font-size: 13px; text-align: center; border-bottom: 1px solid rgba(226,120,120,0.3); }
|
||||
@media (max-width: 700px) {
|
||||
|
|
@ -1061,10 +1061,15 @@ function renderTracks() {
|
|||
}
|
||||
});
|
||||
div.addEventListener('dblclick', () => {
|
||||
selectedIndices.clear();
|
||||
selectedIndices.add(realIdx);
|
||||
anchorTrack = t;
|
||||
playTrack(realIdx);
|
||||
if (realIdx === currentIndex) {
|
||||
audio.currentTime = 0;
|
||||
audio.play().catch(() => {});
|
||||
} else {
|
||||
selectedIndices.clear();
|
||||
selectedIndices.add(realIdx);
|
||||
anchorTrack = t;
|
||||
playTrack(realIdx);
|
||||
}
|
||||
});
|
||||
div.draggable = true;
|
||||
div.addEventListener('dragstart', (e) => {
|
||||
|
|
@ -1120,7 +1125,7 @@ function renderTracks() {
|
|||
}
|
||||
function escHtml(s) {
|
||||
const d = document.createElement('div');
|
||||
d.textContent = s;
|
||||
d.textContent = s.replace(/[\r\n]+/g, ' ');
|
||||
return d.innerHTML;
|
||||
}
|
||||
function playTrack(i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue