Merge branch 'follow-hashtags' into 'develop'
Add Followed hashtags page See merge request soapbox-pub/soapbox!2588
This commit is contained in:
commit
acdc781bc2
10 changed files with 34 additions and 2 deletions
|
@ -28,6 +28,7 @@ const messages = defineMessages({
|
||||||
domainBlocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
|
domainBlocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
|
||||||
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
|
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
|
||||||
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
|
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
|
||||||
|
followedTags: { id: 'navigation_bar.followed_tags', defaultMessage: 'Followed hashtags' },
|
||||||
soapboxConfig: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' },
|
soapboxConfig: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' },
|
||||||
accountMigration: { id: 'navigation_bar.account_migration', defaultMessage: 'Move account' },
|
accountMigration: { id: 'navigation_bar.account_migration', defaultMessage: 'Move account' },
|
||||||
accountAliases: { id: 'navigation_bar.account_aliases', defaultMessage: 'Account aliases' },
|
accountAliases: { id: 'navigation_bar.account_aliases', defaultMessage: 'Account aliases' },
|
||||||
|
@ -305,6 +306,15 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{features.followedHashtagsList && (
|
||||||
|
<SidebarLink
|
||||||
|
to='/followed_tags'
|
||||||
|
icon={require('@tabler/icons/hash.svg')}
|
||||||
|
text={intl.formatMessage(messages.followedTags)}
|
||||||
|
onClick={onClose}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{account.admin && (
|
{account.admin && (
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/soapbox/config'
|
to='/soapbox/config'
|
||||||
|
|
|
@ -48,6 +48,9 @@ const LinkFooter: React.FC = (): JSX.Element => {
|
||||||
{(features.filters || features.filtersV2) && (
|
{(features.filters || features.filtersV2) && (
|
||||||
<FooterLink to='/filters'><FormattedMessage id='navigation_bar.filters' defaultMessage='Filters' /></FooterLink>
|
<FooterLink to='/filters'><FormattedMessage id='navigation_bar.filters' defaultMessage='Filters' /></FooterLink>
|
||||||
)}
|
)}
|
||||||
|
{features.followedHashtagsList && (
|
||||||
|
<FooterLink to='/followed_tags'><FormattedMessage id='navigation_bar.followed_tags' defaultMessage='Followed hashtags' /></FooterLink>
|
||||||
|
)}
|
||||||
{features.federating && (
|
{features.federating && (
|
||||||
<FooterLink to='/domain_blocks'><FormattedMessage id='navigation_bar.domain_blocks' defaultMessage='Domain blocks' /></FooterLink>
|
<FooterLink to='/domain_blocks'><FormattedMessage id='navigation_bar.domain_blocks' defaultMessage='Domain blocks' /></FooterLink>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -135,6 +135,7 @@ import {
|
||||||
GroupMembershipRequests,
|
GroupMembershipRequests,
|
||||||
Announcements,
|
Announcements,
|
||||||
EditGroup,
|
EditGroup,
|
||||||
|
FollowedTags,
|
||||||
} from './util/async-components';
|
} from './util/async-components';
|
||||||
import { WrappedRoute } from './util/react-router-helpers';
|
import { WrappedRoute } from './util/react-router-helpers';
|
||||||
|
|
||||||
|
@ -293,6 +294,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/new' page={DefaultPage} component={EditFilter} content={children} />}
|
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/new' page={DefaultPage} component={EditFilter} content={children} />}
|
||||||
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/:id' page={DefaultPage} component={EditFilter} content={children} />}
|
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters/:id' page={DefaultPage} component={EditFilter} content={children} />}
|
||||||
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters' page={DefaultPage} component={Filters} content={children} />}
|
{(features.filters || features.filtersV2) && <WrappedRoute path='/filters' page={DefaultPage} component={Filters} content={children} />}
|
||||||
|
{(features.followedHashtagsList) && <WrappedRoute path='/followed_tags' page={DefaultPage} component={FollowedTags} content={children} />}
|
||||||
<WrappedRoute path='/@:username' publicRoute exact component={AccountTimeline} page={ProfilePage} content={children} />
|
<WrappedRoute path='/@:username' publicRoute exact component={AccountTimeline} page={ProfilePage} content={children} />
|
||||||
<WrappedRoute path='/@:username/with_replies' publicRoute={!authenticatedProfile} component={AccountTimeline} page={ProfilePage} content={children} componentParams={{ withReplies: true }} />
|
<WrappedRoute path='/@:username/with_replies' publicRoute={!authenticatedProfile} component={AccountTimeline} page={ProfilePage} content={children} componentParams={{ withReplies: true }} />
|
||||||
<WrappedRoute path='/@:username/followers' publicRoute={!authenticatedProfile} component={Followers} page={ProfilePage} content={children} />
|
<WrappedRoute path='/@:username/followers' publicRoute={!authenticatedProfile} component={Followers} page={ProfilePage} content={children} />
|
||||||
|
|
|
@ -637,3 +637,7 @@ export function Announcements() {
|
||||||
export function EditAnnouncementModal() {
|
export function EditAnnouncementModal() {
|
||||||
return import(/* webpackChunkName: "features/admin/announcements" */'../components/modals/edit-announcement-modal');
|
return import(/* webpackChunkName: "features/admin/announcements" */'../components/modals/edit-announcement-modal');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function FollowedTags() {
|
||||||
|
return import(/* webpackChunkName: "features/followed-tags" */'../../followed-tags');
|
||||||
|
}
|
||||||
|
|
|
@ -350,6 +350,7 @@
|
||||||
"column.filters.title": "Title",
|
"column.filters.title": "Title",
|
||||||
"column.filters.whole_word": "Whole word",
|
"column.filters.whole_word": "Whole word",
|
||||||
"column.follow_requests": "Follow requests",
|
"column.follow_requests": "Follow requests",
|
||||||
|
"column.followed_tags": "Followed hashtags",
|
||||||
"column.followers": "Followers",
|
"column.followers": "Followers",
|
||||||
"column.following": "Following",
|
"column.following": "Following",
|
||||||
"column.group_blocked_members": "Banned Members",
|
"column.group_blocked_members": "Banned Members",
|
||||||
|
@ -676,6 +677,7 @@
|
||||||
"empty_column.filters": "You haven't created any muted words yet.",
|
"empty_column.filters": "You haven't created any muted words yet.",
|
||||||
"empty_column.follow_recommendations": "Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.",
|
"empty_column.follow_recommendations": "Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.",
|
||||||
"empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.",
|
"empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.",
|
||||||
|
"empty_column.followed_tags": "You haven't followed any hashtag yet.",
|
||||||
"empty_column.group": "There are no posts in this group yet.",
|
"empty_column.group": "There are no posts in this group yet.",
|
||||||
"empty_column.group_blocks": "The group hasn't banned any users yet.",
|
"empty_column.group_blocks": "The group hasn't banned any users yet.",
|
||||||
"empty_column.group_membership_requests": "There are no pending membership requests for this group.",
|
"empty_column.group_membership_requests": "There are no pending membership requests for this group.",
|
||||||
|
@ -1083,6 +1085,7 @@
|
||||||
"navigation_bar.favourites": "Likes",
|
"navigation_bar.favourites": "Likes",
|
||||||
"navigation_bar.filters": "Filters",
|
"navigation_bar.filters": "Filters",
|
||||||
"navigation_bar.follow_requests": "Follow requests",
|
"navigation_bar.follow_requests": "Follow requests",
|
||||||
|
"navigation_bar.followed_tags": "Followed hashtags",
|
||||||
"navigation_bar.import_data": "Import data",
|
"navigation_bar.import_data": "Import data",
|
||||||
"navigation_bar.in_reply_to": "In reply to",
|
"navigation_bar.in_reply_to": "In reply to",
|
||||||
"navigation_bar.invites": "Invites",
|
"navigation_bar.invites": "Invites",
|
||||||
|
|
|
@ -29,7 +29,7 @@ import custom_emojis from './custom-emojis';
|
||||||
import domain_lists from './domain-lists';
|
import domain_lists from './domain-lists';
|
||||||
import dropdown_menu from './dropdown-menu';
|
import dropdown_menu from './dropdown-menu';
|
||||||
import filters from './filters';
|
import filters from './filters';
|
||||||
import followed_tags from './followed_tags';
|
import followed_tags from './followed-tags';
|
||||||
import group_memberships from './group-memberships';
|
import group_memberships from './group-memberships';
|
||||||
import group_relationships from './group-relationships';
|
import group_relationships from './group-relationships';
|
||||||
import groups from './groups';
|
import groups from './groups';
|
||||||
|
|
|
@ -62,6 +62,16 @@ describe('parseVersion', () => {
|
||||||
build: 'cofe',
|
build: 'cofe',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('with Mastodon nightly build', () => {
|
||||||
|
const version = '4.1.2+nightly-20230627';
|
||||||
|
expect(parseVersion(version)).toEqual({
|
||||||
|
software: 'Mastodon',
|
||||||
|
version: '4.1.2',
|
||||||
|
compatVersion: '4.1.2',
|
||||||
|
build: 'nightly-20230627',
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getFeatures', () => {
|
describe('getFeatures', () => {
|
||||||
|
|
|
@ -992,7 +992,7 @@ interface Backend {
|
||||||
|
|
||||||
/** Get information about the software from its version string */
|
/** Get information about the software from its version string */
|
||||||
export const parseVersion = (version: string): Backend => {
|
export const parseVersion = (version: string): Backend => {
|
||||||
const regex = /^([\w+.]*)(?: \(compatible; ([\w]*) (.*)\))?$/;
|
const regex = /^([\w+.-]*)(?: \(compatible; ([\w]*) (.*)\))?$/;
|
||||||
const match = regex.exec(version);
|
const match = regex.exec(version);
|
||||||
|
|
||||||
const semverString = match && (match[3] || match[1]);
|
const semverString = match && (match[3] || match[1]);
|
||||||
|
|
Loading…
Reference in a new issue