diff --git a/packages/pl-fe/src/components/dropdown-navigation.tsx b/packages/pl-fe/src/components/dropdown-navigation.tsx index df6479f8d..e73642218 100644 --- a/packages/pl-fe/src/components/dropdown-navigation.tsx +++ b/packages/pl-fe/src/components/dropdown-navigation.tsx @@ -422,6 +422,20 @@ const DropdownNavigation: React.FC = React.memo((): JSX.Element | null => { /> )} + {features.rssFeedSubscriptions && ( + + } + onClick={closeSidebar} + /> + )} + {(account.is_admin ?? account.is_moderator) && ( = React.memo(({ shrink }) }); } + if (features.rssFeedSubscriptions) { + menu.push({ + to: '/rss_feed_subscriptions', + text: intl.formatMessage(messages.rssFeedSubscriptions), + icon: require('@phosphor-icons/core/regular/rss.svg'), + }); + } + if (scheduledStatusCount > 0) { menu.push({ to: '/scheduled_statuses', diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index bec2cb17a..b55474668 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -257,17 +257,23 @@ const Status: React.FC = (props) => { }; const handleHotkeyReply = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + e?.preventDefault(); dispatch(replyCompose(actualStatus, status.reblog_id ? status.account : undefined)); }; const handleHotkeyFavourite = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + e?.preventDefault(); if (status.favourited) unfavouriteStatus(); else favouriteStatus(); }; const handleHotkeyBoost = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + const modalReblog = () => { if (status.reblogged) unreblogStatus(); else reblogStatus(undefined); @@ -280,6 +286,8 @@ const Status: React.FC = (props) => { }; const handleHotkeyMention = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + e?.preventDefault(); dispatch(mentionCompose(actualStatus.account)); }; @@ -312,6 +320,8 @@ const Status: React.FC = (props) => { }; const handleHotkeyReact = () => { + if (status.rss_feed) return; + (node.current?.querySelector('.emoji-picker-dropdown') as HTMLButtonElement)?.click(); }; diff --git a/packages/pl-fe/src/features/status/components/thread.tsx b/packages/pl-fe/src/features/status/components/thread.tsx index 240076d0a..dae6c6178 100644 --- a/packages/pl-fe/src/features/status/components/thread.tsx +++ b/packages/pl-fe/src/features/status/components/thread.tsx @@ -178,12 +178,6 @@ const Thread = ({ const statusRef = useRef(null); const scroller = useRef(null); - const handleHotkeyReact = () => { - if (statusRef.current) { - (node.current?.querySelector('.emoji-picker-dropdown') as HTMLButtonElement)?.click(); - } - }; - const handleFavouriteClick = (status: SelectedStatus) => { if (status.favourited) unfavouriteStatus(); else favouriteStatus(); @@ -231,19 +225,27 @@ const Thread = ({ }; const handleHotkeyReply = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + e?.preventDefault(); handleReplyClick(status); }; const handleHotkeyFavourite = () => { + if (status.rss_feed) return; + handleFavouriteClick(status); }; const handleHotkeyBoost = () => { + if (status.rss_feed) return; + handleReblogClick(status); }; const handleHotkeyMention = (e?: KeyboardEvent) => { + if (status.rss_feed) return; + e?.preventDefault(); const { account } = status; if (!account || typeof account !== 'object') return; @@ -258,6 +260,14 @@ const Thread = ({ toggleStatusesMediaHidden([status.id]); }; + const handleHotkeyReact = () => { + if (status.rss_feed) return; + + if (statusRef.current) { + (node.current?.querySelector('.emoji-picker-dropdown') as HTMLButtonElement)?.click(); + } + }; + const handleMoveUp = (id: string) => { const modalOffset = isModal ? 1 : 0; if (id === status.id) { diff --git a/packages/pl-fe/src/locales/en.json b/packages/pl-fe/src/locales/en.json index d072273b4..9077a9a8c 100644 --- a/packages/pl-fe/src/locales/en.json +++ b/packages/pl-fe/src/locales/en.json @@ -1339,6 +1339,7 @@ "navigation_bar.interaction_policy": "Status interaction rules", "navigation_bar.logout": "Logout", "navigation_bar.manage_event": "Manage event", + "navigation_bar.rss_feed_subscriptions": "Subscribed RSS feeds", "new_event_panel.action": "Create event", "new_event_panel.subtitle": "Can't find what you're looking for? Schedule your own event.", "new_event_panel.title": "Create new event",