Merge branch 'global-feed' into 'main'
Rename "Fediverse" tab to "Global" See merge request soapbox-pub/soapbox!3012
This commit is contained in:
commit
c41b2c794e
|
@ -11,7 +11,7 @@ import { useAccount } from 'soapbox/api/hooks';
|
||||||
import Account from 'soapbox/components/account';
|
import Account from 'soapbox/components/account';
|
||||||
import { Stack, Divider, HStack, Icon, IconButton, Text } from 'soapbox/components/ui';
|
import { Stack, Divider, HStack, Icon, IconButton, Text } from 'soapbox/components/ui';
|
||||||
import ProfileStats from 'soapbox/features/ui/components/profile-stats';
|
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 { makeGetOtherAccounts } from 'soapbox/selectors';
|
||||||
|
|
||||||
import type { List as ImmutableList } from 'immutable';
|
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 settings = useAppSelector((state) => getSettings(state));
|
||||||
const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count());
|
const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count());
|
||||||
const groupsPath = useGroupsPath();
|
const groupsPath = useGroupsPath();
|
||||||
|
const instance = useInstance();
|
||||||
|
|
||||||
const closeButtonRef = React.useRef(null);
|
const closeButtonRef = React.useRef(null);
|
||||||
|
|
||||||
|
@ -248,16 +249,16 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/timeline/local'
|
to='/timeline/local'
|
||||||
icon={features.federating ? require('@tabler/icons/outline/affiliate.svg') : require('@tabler/icons/outline/world.svg')}
|
icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
||||||
text={features.federating ? <FormattedMessage id='tabs_bar.local' defaultMessage='Local' /> : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{features.federating && (
|
{features.federating && (
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/timeline/fediverse'
|
to='/timeline/global'
|
||||||
icon={require('@tabler/icons/outline/topology-star-ring-3.svg')}
|
icon={require('@tabler/icons/outline/world.svg')}
|
||||||
text={<FormattedMessage id='tabs_bar.fediverse' defaultMessage='Fediverse' />}
|
text={<FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -179,17 +179,16 @@ const SidebarNavigation = () => {
|
||||||
{(account || !restrictUnauth.timelines.local) && (
|
{(account || !restrictUnauth.timelines.local) && (
|
||||||
<SidebarNavigationLink
|
<SidebarNavigationLink
|
||||||
to='/timeline/local'
|
to='/timeline/local'
|
||||||
icon={features.federating ? require('@tabler/icons/outline/affiliate.svg') : require('@tabler/icons/outline/world.svg')}
|
icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
||||||
activeIcon={features.federating ? require('@tabler/icons/filled/affiliate.svg') : undefined}
|
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||||
text={features.federating ? <FormattedMessage id='tabs_bar.local' defaultMessage='Local' /> : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(features.federating && (account || !restrictUnauth.timelines.federated)) && (
|
{(features.federating && (account || !restrictUnauth.timelines.federated)) && (
|
||||||
<SidebarNavigationLink
|
<SidebarNavigationLink
|
||||||
to='/timeline/fediverse'
|
to='/timeline/global'
|
||||||
icon={require('@tabler/icons/outline/topology-star-ring-3.svg')}
|
icon={require('@tabler/icons/outline/world.svg')}
|
||||||
text={<FormattedMessage id='tabs_bar.fediverse' defaultMessage='Fediverse' />}
|
text={<FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -13,7 +13,7 @@ import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker
|
||||||
import Timeline from '../ui/components/timeline';
|
import Timeline from '../ui/components/timeline';
|
||||||
|
|
||||||
const messages = defineMessages({
|
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' },
|
dismiss: { id: 'fediverse_tab.explanation_box.dismiss', defaultMessage: 'Don\'t show again' },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
https://stackoverflow.com/a/68637108
|
https://stackoverflow.com/a/68637108
|
||||||
*/}
|
*/}
|
||||||
{features.federating && <WrappedRoute path='/timeline/local' exact page={HomePage} component={CommunityTimeline} content={children} publicRoute />}
|
{features.federating && <WrappedRoute path='/timeline/local' exact page={HomePage} component={CommunityTimeline} content={children} publicRoute />}
|
||||||
{features.federating && <WrappedRoute path='/timeline/fediverse' exact page={HomePage} component={PublicTimeline} content={children} publicRoute />}
|
{features.federating && <WrappedRoute path='/timeline/global' exact page={HomePage} component={PublicTimeline} content={children} publicRoute />}
|
||||||
{features.federating && <WrappedRoute path='/timeline/:instance' exact page={RemoteInstancePage} component={RemoteTimeline} content={children} />}
|
{features.federating && <WrappedRoute path='/timeline/:instance' exact page={RemoteInstancePage} component={RemoteTimeline} content={children} />}
|
||||||
|
|
||||||
{features.conversations && <WrappedRoute path='/conversations' page={DefaultPage} component={Conversations} content={children} />}
|
{features.conversations && <WrappedRoute path='/conversations' page={DefaultPage} component={Conversations} content={children} />}
|
||||||
|
@ -202,11 +202,11 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
<Redirect from='/web/:path' to='/:path' />
|
<Redirect from='/web/:path' to='/:path' />
|
||||||
<Redirect from='/timelines/home' to='/' />
|
<Redirect from='/timelines/home' to='/' />
|
||||||
<Redirect from='/timelines/public/local' to='/timeline/local' />
|
<Redirect from='/timelines/public/local' to='/timeline/local' />
|
||||||
<Redirect from='/timelines/public' to='/timeline/fediverse' />
|
<Redirect from='/timelines/public' to='/timeline/global' />
|
||||||
<Redirect from='/timelines/direct' to='/messages' />
|
<Redirect from='/timelines/direct' to='/messages' />
|
||||||
|
|
||||||
{/* Pleroma FE web routes */}
|
{/* Pleroma FE web routes */}
|
||||||
<Redirect from='/main/all' to='/timeline/fediverse' />
|
<Redirect from='/main/all' to='/timeline/global' />
|
||||||
<Redirect from='/main/public' to='/timeline/local' />
|
<Redirect from='/main/public' to='/timeline/local' />
|
||||||
<Redirect from='/main/friends' to='/' />
|
<Redirect from='/main/friends' to='/' />
|
||||||
<Redirect from='/tag/:id' to='/tags/:id' />
|
<Redirect from='/tag/:id' to='/tags/:id' />
|
||||||
|
@ -244,6 +244,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
<Redirect from='/auth/mfa' to='/settings/mfa' />
|
<Redirect from='/auth/mfa' to='/settings/mfa' />
|
||||||
<Redirect from='/auth/password/new' to='/reset-password' />
|
<Redirect from='/auth/password/new' to='/reset-password' />
|
||||||
<Redirect from='/auth/password/edit' to={`/edit-password${search}`} />
|
<Redirect from='/auth/password/edit' to={`/edit-password${search}`} />
|
||||||
|
<Redirect from='/timeline/fediverse' to='/timeline/global' />
|
||||||
|
|
||||||
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
||||||
|
|
||||||
|
|
|
@ -423,7 +423,7 @@
|
||||||
"column.notifications": "Notifications",
|
"column.notifications": "Notifications",
|
||||||
"column.pins": "Pinned posts",
|
"column.pins": "Pinned posts",
|
||||||
"column.preferences": "Preferences",
|
"column.preferences": "Preferences",
|
||||||
"column.public": "Fediverse timeline",
|
"column.public": "Global timeline",
|
||||||
"column.quotes": "Post quotes",
|
"column.quotes": "Post quotes",
|
||||||
"column.reactions": "Reactions",
|
"column.reactions": "Reactions",
|
||||||
"column.reblogs": "Reposts",
|
"column.reblogs": "Reposts",
|
||||||
|
@ -1569,10 +1569,9 @@
|
||||||
"sw.url": "Script URL",
|
"sw.url": "Script URL",
|
||||||
"tabs_bar.all": "All",
|
"tabs_bar.all": "All",
|
||||||
"tabs_bar.dashboard": "Dashboard",
|
"tabs_bar.dashboard": "Dashboard",
|
||||||
"tabs_bar.fediverse": "Fediverse",
|
"tabs_bar.global": "Global",
|
||||||
"tabs_bar.groups": "Groups",
|
"tabs_bar.groups": "Groups",
|
||||||
"tabs_bar.home": "Home",
|
"tabs_bar.home": "Home",
|
||||||
"tabs_bar.local": "Local",
|
|
||||||
"tabs_bar.more": "More",
|
"tabs_bar.more": "More",
|
||||||
"tabs_bar.notifications": "Notifications",
|
"tabs_bar.notifications": "Notifications",
|
||||||
"tabs_bar.profile": "Profile",
|
"tabs_bar.profile": "Profile",
|
||||||
|
|
Loading…
Reference in New Issue