Skip to content
This repository was archived by the owner on Oct 24, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function Activity({ activities }: { activities: Entry[] }) {
{time.format(entry.createdAt)}
</span>
<span className="min-w-0">
{entry.kind !== "auto" && (entry.who ?? "有人")}
{entry.kind !== "auto" && `${entry.who ?? "有人"} `}
{sentence(entry)}
</span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/played/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function Played() {
<span className="truncate">{item.track.title}</span>
<span className="truncate text-muted-foreground">
{addedLine(item)}
{how && `,${item.endedBy ?? "播放器"}${how}`}
{how && `,${item.endedBy ?? "播放器"} ${how}`}
</span>
</div>
<span className="hidden shrink-0 text-muted-foreground tabular-nums sm:inline">
Expand Down
5 changes: 3 additions & 2 deletions app/song.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ export const addedAsLabel = {
auto: "自動推薦",
} as const

/** Who brought a song and how: "小明點播", "小明的歌單", "自動推薦". */
/** Who brought a song and how: "小明 點播", "小明 的歌單", "自動推薦". A
* space keeps the name apart from the words after it. */
export function addedLine(item: {
addedAs: keyof typeof addedAsLabel
addedBy: string | null
fromPlaylist: boolean
}) {
if (item.addedAs === "auto") return addedAsLabel.auto
return `${item.addedBy ?? "有人"}${item.fromPlaylist ? "的歌單" : addedAsLabel[item.addedAs]}`
return `${item.addedBy ?? "有人"} ${item.fromPlaylist ? "的歌單" : addedAsLabel[item.addedAs]}`
}
Loading