mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 14:00:54 +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-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-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-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-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; }
|
.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; }
|
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); }
|
#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) {
|
@media (max-width: 700px) {
|
||||||
|
|
@ -1061,10 +1061,15 @@ function renderTracks() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
div.addEventListener('dblclick', () => {
|
div.addEventListener('dblclick', () => {
|
||||||
selectedIndices.clear();
|
if (realIdx === currentIndex) {
|
||||||
selectedIndices.add(realIdx);
|
audio.currentTime = 0;
|
||||||
anchorTrack = t;
|
audio.play().catch(() => {});
|
||||||
playTrack(realIdx);
|
} else {
|
||||||
|
selectedIndices.clear();
|
||||||
|
selectedIndices.add(realIdx);
|
||||||
|
anchorTrack = t;
|
||||||
|
playTrack(realIdx);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
div.draggable = true;
|
div.draggable = true;
|
||||||
div.addEventListener('dragstart', (e) => {
|
div.addEventListener('dragstart', (e) => {
|
||||||
|
|
@ -1120,7 +1125,7 @@ function renderTracks() {
|
||||||
}
|
}
|
||||||
function escHtml(s) {
|
function escHtml(s) {
|
||||||
const d = document.createElement('div');
|
const d = document.createElement('div');
|
||||||
d.textContent = s;
|
d.textContent = s.replace(/[\r\n]+/g, ' ');
|
||||||
return d.innerHTML;
|
return d.innerHTML;
|
||||||
}
|
}
|
||||||
function playTrack(i) {
|
function playTrack(i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue