mirror of
https://github.com/narrrl/pl8list-rewind.git
synced 2026-11-04 16:47:00 +01:00
Timed comments on the waveform
Each comment sits as a dot under the moment it was left at. When the music gets there the dot pings and a bubble grows out of it on a spark, then drifts up and fades; a mouse over a dot peeks at it. The server fetches the newest 60 comments from pl8list on demand and keeps them for 15 minutes. A setting turns them off.
This commit is contained in:
1 parent
b290cd49e3
commit
b42780d24b
12 files changed
+579
-2
No files matched your search
@@ -130,6 +130,20 @@ export const artist = (handle: string) => getJSON<ArtistInfo>("/local/artist?" +
|
||||
export const track = (handle: string, slug: string) =>
|
||||
getJSON<{ track: Track }>("/local/track?" + new URLSearchParams({ handle, slug }));
|
||||
|
||||
/// A comment left at a moment of the track (`at`, seconds in).
|
||||
export interface Comment {
|
||||
id: number;
|
||||
at: number;
|
||||
body: string;
|
||||
handle: string;
|
||||
name: string;
|
||||
img: string | null;
|
||||
verified: boolean;
|
||||
}
|
||||
|
||||
export const comments = (trackId: number) =>
|
||||
getJSON<{ comments: Comment[] }>("/local/comments?" + new URLSearchParams({ id: String(trackId) }));
|
||||
|
||||
export const likes = () => getJSON<{ tracks: Track[] }>("/local/likes");
|
||||
|
||||
export const me = () => getJSON<Me>("/local/me");
|
||||
|
||||
Reference in new issue
Block a user