From 75ecf1914794c278e3f843b6e345a2c843ecc7f4 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Fri, 19 Jun 2026 02:16:50 +0200 Subject: [PATCH] feat(notifications): link the subscribe activity to the channel The "Subscribed on YouTube" inbox entry now names the channel and offers two convenience links that survive a reload (driven by the typed payload, not the live callback): "Channel manager" (jumps to the manager focused on that channel) and "Open on YouTube". Wires the panel to the app's focus-channel navigation; trilingual strings. --- frontend/src/App.tsx | 2 +- .../src/components/NotificationsPanel.tsx | 29 ++++++++++++++++++- .../src/i18n/locales/de/notifications.json | 2 ++ .../src/i18n/locales/en/notifications.json | 2 ++ .../src/i18n/locales/hu/notifications.json | 2 ++ 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 0a6b52b..306aab0 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -451,7 +451,7 @@ export default function App() { ) : page === "playlists" ? ( ) : page === "notifications" ? ( - + ) : page === "settings" ? ( void; setPage: (p: Page) => void; + onFocusChannel: (name: string) => void; }) { const { t } = useTranslation(); const qc = useQueryClient(); @@ -183,6 +186,7 @@ export default function NotificationsPanel({ t={t} onFind={locateHidden} onRevert={revertState} + onFocusChannel={onFocusChannel} onRemove={() => removeClient(n.id)} /> ))} @@ -287,18 +291,22 @@ function ClientActivityRow({ t, onFind, onRevert, + onFocusChannel, onRemove, }: { n: ClientNotif; t: (k: string, o?: any) => string; onFind: (meta: VideoHiddenMeta) => void; onRevert: (meta: VideoHiddenMeta | VideoWatchedMeta) => void; + onFocusChannel: (name: string) => void; onRemove: () => void; }) { const { icon: Icon, color } = LEVEL_STYLE[n.level]; const needsAction = n.requiresInteraction && !n.dismissed; const hidden = n.meta?.kind === "video-hidden" ? n.meta : null; const watched = n.meta?.kind === "video-watched" ? n.meta : null; + const subscribed: ChannelSubscribedMeta | null = + n.meta?.kind === "channel-subscribed" ? n.meta : null; return (
+ ) : subscribed ? ( +
+ + + + {t("notifications.openOnYouTube")} + +
) : ( n.action && diff --git a/frontend/src/i18n/locales/de/notifications.json b/frontend/src/i18n/locales/de/notifications.json index f08acb7..ec7f745 100644 --- a/frontend/src/i18n/locales/de/notifications.json +++ b/frontend/src/i18n/locales/de/notifications.json @@ -8,6 +8,8 @@ "findInFeed": "Im Feed finden", "unhide": "Einblenden", "unwatch": "Nicht angesehen", + "openInManager": "Kanalverwaltung", + "openOnYouTube": "Auf YouTube öffnen", "unhidden": "Eingeblendet „{{title}}”", "unwatched": "Als nicht angesehen markiert „{{title}}”", "time": { diff --git a/frontend/src/i18n/locales/en/notifications.json b/frontend/src/i18n/locales/en/notifications.json index 352bc22..08a23dd 100644 --- a/frontend/src/i18n/locales/en/notifications.json +++ b/frontend/src/i18n/locales/en/notifications.json @@ -8,6 +8,8 @@ "findInFeed": "Find in feed", "unhide": "Unhide", "unwatch": "Unwatch", + "openInManager": "Channel manager", + "openOnYouTube": "Open on YouTube", "unhidden": "Unhidden “{{title}}”", "unwatched": "Unwatched “{{title}}”", "time": { diff --git a/frontend/src/i18n/locales/hu/notifications.json b/frontend/src/i18n/locales/hu/notifications.json index 41c82c3..e305c4b 100644 --- a/frontend/src/i18n/locales/hu/notifications.json +++ b/frontend/src/i18n/locales/hu/notifications.json @@ -8,6 +8,8 @@ "findInFeed": "Keresés a hírfolyamban", "unhide": "Megjelenítés", "unwatch": "Megtekintés visszavonása", + "openInManager": "Csatornakezelő", + "openOnYouTube": "Megnyitás a YouTube-on", "unhidden": "Megjelenítve: „{{title}}”", "unwatched": "Megtekintés visszavonva: „{{title}}”", "time": {