feat(e10): migrate the notification, message, auth and Plex action buttons

Second sweep, 34 more sites: NotificationsPanel (14 -- eight identical
accent text links, three ghost icon buttons, two ghost text actions),
Welcome's five auth links, KeyGate, Messages, NavSidebar, ChatThread,
ShareDialog, ChannelPage, PlexPlaylistView, PlexPlaylistAdd,
PlexCollectionEditor and plexViews.

Moves the font-weight out of Button's BASE and into each variant, so the
`link` variant can be semibold (which is what every text link in this app
looks like) while the action variants stay medium, and no element can end
up with two font-* utilities.

Welcome is the one signed-out surface this session cannot see, so only
its byte-identical link swaps were taken; its primary submit and the
bg-card button family are left for a pass that can UAT the screen.

3x tsc, eslint, knip, prettier, 689 vitest green; UAT on Notifications,
Messages and the nav rail, clean console in a fresh tab.
This commit is contained in:
2026-09-05 18:39:22 +02:00
parent 29bb914a95
commit 47e2293de3
13 changed files with 165 additions and 153 deletions
+71 -58
View File
@@ -37,6 +37,7 @@ import {
type VideoWatchedMeta,
} from "../lib/notifications";
import { channelYouTubeUrl, relativeFromMs, relativeTime } from "../lib/format";
import { Button } from "./ui/Button";
import { LEVEL_STYLE } from "./ui/Toaster";
import { PageToolbar } from "./ui/PageShell";
import { LoadingState, StateMessage } from "./ui/QueryState";
@@ -132,22 +133,24 @@ export default function NotificationsPanel() {
</div>
{hasAny && (
<div className="flex items-center gap-2">
<button
<Button
variant="ghost"
size="xs"
onClick={markAll}
disabled={!hasUnread || readAllMut.isPending}
className="inline-flex items-center gap-1.5 text-xs px-2.5 py-1.5 rounded-lg text-muted hover:text-fg hover:bg-card transition disabled:opacity-40"
icon={<CheckCheck className="w-4 h-4" />}
>
<CheckCheck className="w-4 h-4" />
{t("inbox.markAllRead")}
</button>
<button
</Button>
<Button
variant="ghost"
size="xs"
onClick={clearEverything}
disabled={clearMut.isPending}
className="inline-flex items-center gap-1.5 text-xs px-2.5 py-1.5 rounded-lg text-muted hover:text-fg hover:bg-card transition disabled:opacity-40"
icon={<Trash2 className="w-4 h-4" />}
>
<Trash2 className="w-4 h-4" />
{t("inbox.clearAll")}
</button>
</Button>
</div>
)}
</div>
@@ -305,43 +308,45 @@ function NotificationRow({
</ul>
)}
{isScheduler && (
<button
<Button
variant="link"
className="text-sm mt-1.5"
onClick={onOpenScheduler}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline mt-1.5"
icon={<Activity className="w-3.5 h-3.5" />}
>
<Activity className="w-3.5 h-3.5" />
{t("inbox.openScheduler")}
</button>
</Button>
)}
{isDownloadDone && (
<button
<Button
variant="link"
className="text-sm mt-1.5"
onClick={onOpenDownloads}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline mt-1.5"
icon={<Download className="w-3.5 h-3.5" />}
>
<Download className="w-3.5 h-3.5" />
{t("inbox.openDownloads")}
</button>
</Button>
)}
</div>
<div className="flex items-center gap-1 shrink-0">
{!n.read && (
<button
<Button
variant="ghost"
size="icon-sm"
onClick={onRead}
title={t("inbox.markRead")}
aria-label={t("inbox.markRead")}
className="p-1.5 rounded-lg text-muted hover:text-fg hover:bg-card transition"
>
<Check className="w-4 h-4" />
</button>
icon={<Check className="w-4 h-4" />}
/>
)}
<button
<Button
variant="ghost"
size="icon-sm"
onClick={onDismiss}
title={t("inbox.dismiss")}
aria-label={t("inbox.dismiss")}
className="p-1.5 rounded-lg text-muted hover:text-fg hover:bg-card transition"
>
<X className="w-4 h-4" />
</button>
icon={<X className="w-4 h-4" />}
/>
</div>
</div>
);
@@ -396,47 +401,52 @@ function ClientActivityRow({
</div>
{hidden ? (
<div className="flex items-center gap-3 mt-1">
<button
<Button
variant="link"
className="text-sm"
onClick={() => onFind(hidden)}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline"
icon={<Search className="w-3.5 h-3.5" />}
>
<Search className="w-3.5 h-3.5" />
{t("notifications.findInFeed")}
</button>
<button
</Button>
<Button
variant="link"
className="text-sm"
onClick={() => onRevert(hidden)}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline"
icon={<Eye className="w-3.5 h-3.5" />}
>
<Eye className="w-3.5 h-3.5" />
{t("notifications.unhide")}
</button>
</Button>
</div>
) : watched ? (
<div className="flex items-center gap-3 mt-1">
<button
<Button
variant="link"
className="text-sm"
onClick={() => onFind(watched)}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline"
icon={<Search className="w-3.5 h-3.5" />}
>
<Search className="w-3.5 h-3.5" />
{t("notifications.findInFeed")}
</button>
<button
</Button>
<Button
variant="link"
className="text-sm"
onClick={() => onRevert(watched)}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline"
icon={<RotateCcw className="w-3.5 h-3.5" />}
>
<RotateCcw className="w-3.5 h-3.5" />
{t("notifications.unwatch")}
</button>
</Button>
</div>
) : subscribed ? (
<div className="flex items-center gap-3 mt-1">
<button
<Button
variant="link"
className="text-sm"
onClick={() => onFocusChannel(subscribed.channelName)}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline"
icon={<Tv className="w-3.5 h-3.5" />}
>
<Tv className="w-3.5 h-3.5" />
{t("notifications.openInManager")}
</button>
</Button>
<a
href={channelYouTubeUrl(subscribed.channelId)}
target="_blank"
@@ -448,36 +458,39 @@ function ClientActivityRow({
</a>
</div>
) : access ? (
<button
<Button
variant="link"
className="text-sm mt-1"
onClick={() => onReviewAccess()}
className="flex items-center gap-1 text-accent text-sm font-semibold hover:underline mt-1"
icon={<UserPlus className="w-3.5 h-3.5" />}
>
<UserPlus className="w-3.5 h-3.5" />
{t("common.accessRequestsReview")}
</button>
</Button>
) : (
n.action &&
!n.dismissed && (
<button
<Button
variant="link"
className="mt-1 text-sm"
onClick={() => {
n.action!.onClick();
dismissClient(n.id);
}}
className="mt-1 text-accent text-sm font-semibold hover:underline"
>
{n.action.label}
</button>
</Button>
)
)}
</div>
<button
<Button
variant="ghost"
size="icon-sm"
className="shrink-0"
onClick={onRemove}
title={t("inbox.dismiss")}
aria-label={t("inbox.dismiss")}
className="p-1.5 rounded-lg text-muted hover:text-fg hover:bg-card transition shrink-0"
>
<X className="w-4 h-4" />
</button>
icon={<X className="w-4 h-4" />}
/>
</div>
);
}