From 1a0970c3bd213e3decacf14efaaf435df2922a96 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 30 Apr 2024 18:30:30 -0500 Subject: [PATCH] Rename "Fediverse" tab to "Global" --- src/components/sidebar-menu.tsx | 13 +++++++------ src/components/sidebar-navigation.tsx | 11 +++++------ src/features/public-timeline/index.tsx | 2 +- src/features/ui/index.tsx | 7 ++++--- src/locales/en.json | 5 ++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/sidebar-menu.tsx b/src/components/sidebar-menu.tsx index f8d091b20..5dee7de88 100644 --- a/src/components/sidebar-menu.tsx +++ b/src/components/sidebar-menu.tsx @@ -11,7 +11,7 @@ import { useAccount } from 'soapbox/api/hooks'; import Account from 'soapbox/components/account'; import { Stack, Divider, HStack, Icon, IconButton, Text } from 'soapbox/components/ui'; import ProfileStats from 'soapbox/features/ui/components/profile-stats'; -import { useAppDispatch, useAppSelector, useGroupsPath, useFeatures } from 'soapbox/hooks'; +import { useAppDispatch, useAppSelector, useGroupsPath, useFeatures, useInstance } from 'soapbox/hooks'; import { makeGetOtherAccounts } from 'soapbox/selectors'; import type { List as ImmutableList } from 'immutable'; @@ -89,6 +89,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { const settings = useAppSelector((state) => getSettings(state)); const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count()); const groupsPath = useGroupsPath(); + const instance = useInstance(); const closeButtonRef = React.useRef(null); @@ -248,16 +249,16 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { : } + icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')} + text={features.federating ? instance.title : } onClick={onClose} /> {features.federating && ( } + to='/timeline/global' + icon={require('@tabler/icons/outline/world.svg')} + text={} onClick={onClose} /> )} diff --git a/src/components/sidebar-navigation.tsx b/src/components/sidebar-navigation.tsx index a620dbad8..3c68ee892 100644 --- a/src/components/sidebar-navigation.tsx +++ b/src/components/sidebar-navigation.tsx @@ -179,17 +179,16 @@ const SidebarNavigation = () => { {(account || !restrictUnauth.timelines.local) && ( : } + icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')} + text={features.federating ? instance.title : } /> )} {(features.federating && (account || !restrictUnauth.timelines.federated)) && ( } + to='/timeline/global' + icon={require('@tabler/icons/outline/world.svg')} + text={} /> )} diff --git a/src/features/public-timeline/index.tsx b/src/features/public-timeline/index.tsx index 91c8df007..736366ec2 100644 --- a/src/features/public-timeline/index.tsx +++ b/src/features/public-timeline/index.tsx @@ -13,7 +13,7 @@ import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker import Timeline from '../ui/components/timeline'; const messages = defineMessages({ - title: { id: 'column.public', defaultMessage: 'Fediverse timeline' }, + title: { id: 'column.public', defaultMessage: 'Global timeline' }, dismiss: { id: 'fediverse_tab.explanation_box.dismiss', defaultMessage: 'Don\'t show again' }, }); diff --git a/src/features/ui/index.tsx b/src/features/ui/index.tsx index f31315c02..04b6e164f 100644 --- a/src/features/ui/index.tsx +++ b/src/features/ui/index.tsx @@ -187,7 +187,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => https://stackoverflow.com/a/68637108 */} {features.federating && } - {features.federating && } + {features.federating && } {features.federating && } {features.conversations && } @@ -202,11 +202,11 @@ const SwitchingColumnsArea: React.FC = ({ children }) => - + {/* Pleroma FE web routes */} - + @@ -244,6 +244,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => + diff --git a/src/locales/en.json b/src/locales/en.json index b3aa5d72d..2467f62cf 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -423,7 +423,7 @@ "column.notifications": "Notifications", "column.pins": "Pinned posts", "column.preferences": "Preferences", - "column.public": "Fediverse timeline", + "column.public": "Global timeline", "column.quotes": "Post quotes", "column.reactions": "Reactions", "column.reblogs": "Reposts", @@ -1569,10 +1569,9 @@ "sw.url": "Script URL", "tabs_bar.all": "All", "tabs_bar.dashboard": "Dashboard", - "tabs_bar.fediverse": "Fediverse", + "tabs_bar.global": "Global", "tabs_bar.groups": "Groups", "tabs_bar.home": "Home", - "tabs_bar.local": "Local", "tabs_bar.more": "More", "tabs_bar.notifications": "Notifications", "tabs_bar.profile": "Profile",