Checkpoint web-player design-system refactor and backend track genre tagging
Advances the ongoing token/componentization cleanup (anchored player dock, border-based panels instead of floating shadows, corrected light-mode accent/gradient tokens) alongside in-progress backend support for track genre tags.
This commit is contained in:
@@ -6,6 +6,7 @@ export interface LikedTrack {
|
||||
artist?: string;
|
||||
explicit?: boolean;
|
||||
ownerUserId?: string | number | null;
|
||||
listensCount?: number | string;
|
||||
likedAt: number;
|
||||
}
|
||||
|
||||
@@ -37,6 +38,7 @@ class LikedStore {
|
||||
artist: item.artist,
|
||||
explicit: item.explicit,
|
||||
ownerUserId: item.ownerUserId,
|
||||
listensCount: item.listensCount,
|
||||
likedAt: new Date(tracks[i].createdAt).getTime()
|
||||
};
|
||||
});
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface PlayerTrack {
|
||||
duration: number;
|
||||
explicit?: boolean;
|
||||
ownerUserId?: string | number | null;
|
||||
listensCount?: number | string;
|
||||
}
|
||||
|
||||
export interface Playlist {
|
||||
@@ -23,6 +24,7 @@ export interface QueueItem {
|
||||
artist?: string;
|
||||
explicit?: boolean;
|
||||
ownerUserId?: string | number | null;
|
||||
listensCount?: number | string;
|
||||
}
|
||||
|
||||
export interface ApiTrackLike {
|
||||
@@ -31,6 +33,7 @@ export interface ApiTrackLike {
|
||||
artist?: string | null;
|
||||
isExplicit?: boolean;
|
||||
ownerUserId?: string | number | null;
|
||||
listensCount?: number | string;
|
||||
}
|
||||
|
||||
export function toQueueItems(tracks: ApiTrackLike[]): QueueItem[] {
|
||||
@@ -39,7 +42,8 @@ export function toQueueItems(tracks: ApiTrackLike[]): QueueItem[] {
|
||||
title: track.title,
|
||||
artist: track.artist ?? undefined,
|
||||
explicit: track.isExplicit,
|
||||
ownerUserId: track.ownerUserId
|
||||
ownerUserId: track.ownerUserId,
|
||||
listensCount: track.listensCount
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -68,7 +72,8 @@ function toTrack(item: QueueItem): PlayerTrack {
|
||||
artist: item.artist ?? '',
|
||||
duration: 0,
|
||||
explicit: item.explicit,
|
||||
ownerUserId: item.ownerUserId
|
||||
ownerUserId: item.ownerUserId,
|
||||
listensCount: item.listensCount
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user