nicolium: more ports
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -422,6 +422,20 @@ const DropdownNavigation: React.FC = React.memo((): JSX.Element | null => {
|
||||
/>
|
||||
)}
|
||||
|
||||
{features.rssFeedSubscriptions && (
|
||||
<DropdownNavigationLink
|
||||
to='/rss_feed_subscriptions'
|
||||
icon={require('@phosphor-icons/core/regular/rss.svg')}
|
||||
text={
|
||||
<FormattedMessage
|
||||
id='column.rss_feed_subscriptions'
|
||||
defaultMessage='Subscribed RSS feeds'
|
||||
/>
|
||||
}
|
||||
onClick={closeSidebar}
|
||||
/>
|
||||
)}
|
||||
|
||||
{(account.is_admin ?? account.is_moderator) && (
|
||||
<DropdownNavigationLink
|
||||
to='/pl-fe/admin'
|
||||
|
||||
@ -37,6 +37,10 @@ const messages = defineMessages({
|
||||
events: { id: 'column.events', defaultMessage: 'Events' },
|
||||
profileDirectory: { id: 'column.directory', defaultMessage: 'Profile directory' },
|
||||
followedTags: { id: 'column.followed_tags', defaultMessage: 'Followed hashtags' },
|
||||
rssFeedSubscriptions: {
|
||||
id: 'navigation_bar.rss_feed_subscriptions',
|
||||
defaultMessage: 'Subscribed RSS feeds',
|
||||
},
|
||||
scheduledStatuses: { id: 'column.scheduled_statuses', defaultMessage: 'Scheduled posts' },
|
||||
drafts: { id: 'column.draft_statuses', defaultMessage: 'Drafts' },
|
||||
conversations: { id: 'column.direct', defaultMessage: 'Direct messages' },
|
||||
@ -173,6 +177,14 @@ const SidebarNavigation: React.FC<ISidebarNavigation> = 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',
|
||||
|
||||
@ -257,17 +257,23 @@ const Status: React.FC<IStatus> = (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<IStatus> = (props) => {
|
||||
};
|
||||
|
||||
const handleHotkeyMention = (e?: KeyboardEvent) => {
|
||||
if (status.rss_feed) return;
|
||||
|
||||
e?.preventDefault();
|
||||
dispatch(mentionCompose(actualStatus.account));
|
||||
};
|
||||
@ -312,6 +320,8 @@ const Status: React.FC<IStatus> = (props) => {
|
||||
};
|
||||
|
||||
const handleHotkeyReact = () => {
|
||||
if (status.rss_feed) return;
|
||||
|
||||
(node.current?.querySelector('.emoji-picker-dropdown') as HTMLButtonElement)?.click();
|
||||
};
|
||||
|
||||
|
||||
@ -178,12 +178,6 @@ const Thread = ({
|
||||
const statusRef = useRef<HTMLDivElement>(null);
|
||||
const scroller = useRef<VirtuosoHandle>(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) {
|
||||
|
||||
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user