Merge branch 'instance-domain' into 'main'
Use instance domain for local timeline See merge request soapbox-pub/soapbox!3057
This commit is contained in:
commit
a8fb4061eb
|
@ -248,8 +248,8 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/timeline/local'
|
to='/timeline/local'
|
||||||
icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
icon={features.federating ? require('@tabler/icons/outline/at.svg') : require('@tabler/icons/outline/world.svg')}
|
||||||
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
text={features.federating ? instance.domain : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -178,8 +178,8 @@ 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/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
icon={features.federating ? require('@tabler/icons/outline/at.svg') : require('@tabler/icons/outline/world.svg')}
|
||||||
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
text={features.federating ? instance.domain : <FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,19 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import { expandCommunityTimeline } from 'soapbox/actions/timelines';
|
import { expandCommunityTimeline } from 'soapbox/actions/timelines';
|
||||||
import { useCommunityStream } from 'soapbox/api/hooks';
|
import { useCommunityStream } from 'soapbox/api/hooks';
|
||||||
import PullToRefresh from 'soapbox/components/pull-to-refresh';
|
import PullToRefresh from 'soapbox/components/pull-to-refresh';
|
||||||
import { Column } from 'soapbox/components/ui';
|
import { Column } from 'soapbox/components/ui';
|
||||||
import { useAppSelector, useAppDispatch, useSettings, useTheme } from 'soapbox/hooks';
|
import { useAppSelector, useAppDispatch, useSettings, useTheme, useInstance } from 'soapbox/hooks';
|
||||||
import { useIsMobile } from 'soapbox/hooks/useIsMobile';
|
import { useIsMobile } from 'soapbox/hooks/useIsMobile';
|
||||||
|
|
||||||
import Timeline from '../ui/components/timeline';
|
import Timeline from '../ui/components/timeline';
|
||||||
|
|
||||||
const messages = defineMessages({
|
|
||||||
title: { id: 'column.community', defaultMessage: 'Local timeline' },
|
|
||||||
});
|
|
||||||
|
|
||||||
const CommunityTimeline = () => {
|
const CommunityTimeline = () => {
|
||||||
const intl = useIntl();
|
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const instance = useInstance();
|
||||||
|
|
||||||
const settings = useSettings();
|
const settings = useSettings();
|
||||||
const onlyMedia = settings.community.other.onlyMedia;
|
const onlyMedia = settings.community.other.onlyMedia;
|
||||||
|
@ -41,7 +37,7 @@ const CommunityTimeline = () => {
|
||||||
}, [onlyMedia]);
|
}, [onlyMedia]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column className='-mt-3 sm:mt-0' label={intl.formatMessage(messages.title)} transparent={!isMobile}>
|
<Column className='-mt-3 sm:mt-0' label={instance.domain} transparent={!isMobile}>
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-4 black:sm:p-5'
|
className='black:p-4 black:sm:p-5'
|
||||||
|
|
|
@ -357,7 +357,6 @@
|
||||||
"column.blocks": "Blocks",
|
"column.blocks": "Blocks",
|
||||||
"column.bookmarks": "Bookmarks",
|
"column.bookmarks": "Bookmarks",
|
||||||
"column.chats": "Chats",
|
"column.chats": "Chats",
|
||||||
"column.community": "Local timeline",
|
|
||||||
"column.crypto_donate": "Donate Cryptocurrency",
|
"column.crypto_donate": "Donate Cryptocurrency",
|
||||||
"column.developers": "Developers",
|
"column.developers": "Developers",
|
||||||
"column.developers.service_worker": "Service Worker",
|
"column.developers.service_worker": "Service Worker",
|
||||||
|
|
Loading…
Reference in New Issue