frontend changes
-smaller thumbnails -GPU acceleration -lazy loading/ rendering only visible elements -cover grid shows album tracks on click
This commit is contained in:
@@ -50,6 +50,7 @@ export class TrackList extends LitElement {
|
||||
private virtualizer!: LitVirtualizer;
|
||||
|
||||
private lastSelectedIndex: number | null = null;
|
||||
private lastActiveTrackPath: string | null = null;
|
||||
|
||||
private closeHandler = () => this.closeContextMenu();
|
||||
|
||||
@@ -289,7 +290,7 @@ export class TrackList extends LitElement {
|
||||
background-color: rgba(255, 212, 59, 0.1);
|
||||
}
|
||||
|
||||
.track-row.active .track-name {
|
||||
.track-row.active {
|
||||
color: #ffd43b;
|
||||
}
|
||||
|
||||
@@ -392,6 +393,14 @@ export class TrackList extends LitElement {
|
||||
if (changed.has('columnWidths')) {
|
||||
this.virtualizer?.requestUpdate();
|
||||
}
|
||||
|
||||
const currentPath =
|
||||
this.player.currentTrack?.filePath ?? null;
|
||||
|
||||
if (currentPath !== this.lastActiveTrackPath) {
|
||||
this.lastActiveTrackPath = currentPath;
|
||||
this.virtualizer?.requestUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
private previousHostWidth = 0;
|
||||
|
||||
Reference in New Issue
Block a user