Skip to content
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
18 changes: 2 additions & 16 deletions apps/web/src/app/(app)/me/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Clock3 } from 'lucide-react';
import { cookies } from 'next/headers';
import { HistoryExportButton, HistoryInfiniteList } from '@/components/history';
import { SectionContent } from '@/components/section';
import { P2GlassPanel, P2PageHero, P2Pill } from '@/components/p2';
import { P2GlassPanel, P2PageHero } from '@/components/p2';
import { fetchHistory } from '@/lib/history/api';

export const metadata = {
Expand All @@ -11,13 +11,6 @@ export const metadata = {

export const dynamic = 'force-dynamic';

const SOURCE_FILTERS = [
{ id: 'all', label: 'All sources', active: true },
{ id: 'preview', label: 'From a preview' },
{ id: 'playlist', label: 'From a playlist' },
{ id: 'album', label: 'From an album' },
];

export default async function HistoryPage() {
const cookieStore = await cookies();
const cookieHeader = cookieStore.toString();
Expand All @@ -33,14 +26,7 @@ export default async function HistoryPage() {
actions={<HistoryExportButton />}
/>
<SectionContent className="space-y-6">
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="flex flex-wrap items-center gap-2">
{SOURCE_FILTERS.map((filter) => (
<P2Pill key={filter.id} tone={filter.active ? 'section' : 'outline'}>
{filter.label}
</P2Pill>
))}
</div>
<div className="flex flex-wrap items-center justify-end gap-3">
<span className="font-mono text-[11px] text-fg-muted tabular-nums">
last {Math.min(initial.limit, initial.total)} of {initial.total.toLocaleString()} events
</span>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/app/(app)/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const dynamic = 'force-dynamic';

const CAPABILITY_TILES = [
{ href: '/catalog/tracks', icon: Headphones, label: 'Play previews', sub: '30-second previews' },
{ href: '/catalog', icon: Search, label: 'Browse catalog', sub: '180M tracks indexed' },
{ href: '/catalog', icon: Search, label: 'Browse catalog', sub: 'Fuzzy catalog search' },
{
href: '/me/playlists',
icon: ListMusic,
Expand Down Expand Up @@ -252,7 +252,7 @@ export default async function OverviewPage() {
}
description={
totalPlays > 0
? `${totalPlays.toLocaleString()} plays and ${minutesListened.toLocaleString()} minutes captured from your real listening history. Jump back in below.`
? `${totalPlays.toLocaleString()} plays and ${minutesListened.toLocaleString()} minutes across your top artists. Jump back in below.`
: 'Your listening cockpit: play previews, build history, inspect trends, and jump into playlists.'
}
actions={
Expand Down Expand Up @@ -282,7 +282,7 @@ export default async function OverviewPage() {
<div className="relative grid h-full gap-0 lg:grid-cols-[1fr_1.05fr]">
<div className="p-5 sm:p-6">
<p className="font-mono text-[11px] font-bold tracking-[0.16em] text-section-accent uppercase">
Minutes listened · 30d
Minutes listened · top artists
</p>
<div className="mt-2 flex items-baseline gap-2">
<span className="text-4xl font-extrabold leading-none tracking-[-0.03em] text-fg-strong tabular-nums">
Expand Down
14 changes: 3 additions & 11 deletions apps/web/src/app/(app)/me/stats/top-artists/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,9 @@ export default async function TopArtistsPage() {
title="Who's owning the hours."
description={`Ranked across ${totalPlays.toLocaleString()} plays and ${totalMinutes.toFixed(0)} minutes from your real listening history.`}
actions={
<div className="flex flex-wrap items-center gap-2">
{(['7d', '30d', '90d', '1y'] as const).map((period) => (
<P2Pill
key={period}
tone={period === '30d' ? 'on-block' : 'outline'}
className="text-white/90"
>
{period}
</P2Pill>
))}
</div>
<P2Pill tone="on-block" className="text-white/90">
All time
</P2Pill>
}
/>

Expand Down
Loading