Add "My collections" page (#37552)

This commit is contained in:
diondiondion
2026-01-23 14:51:39 +01:00
committed by GitHub
parent d05df5c197
commit a1acf8f4bc
11 changed files with 492 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ import {
Lists,
ListEdit,
ListMembers,
Collections,
Blocks,
DomainBlocks,
Mutes,
@@ -85,6 +86,7 @@ import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
// Dummy import, to make sure that <Status /> ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
import '../../components/status';
import { areCollectionsEnabled } from '../collections/utils';
const messages = defineMessages({
beforeUnload: { id: 'ui.beforeunload', defaultMessage: 'Your draft will be lost if you leave Mastodon.' },
@@ -227,6 +229,9 @@ class SwitchingColumnsArea extends PureComponent {
<WrappedRoute path='/followed_tags' component={FollowedTags} content={children} />
<WrappedRoute path='/mutes' component={Mutes} content={children} />
<WrappedRoute path='/lists' component={Lists} content={children} />
{areCollectionsEnabled() &&
<WrappedRoute path='/collections' component={Collections} content={children} />
}
<Route component={BundleColumnError} />
</WrappedSwitch>

View File

@@ -42,6 +42,12 @@ export function Lists () {
return import('../../lists');
}
export function Collections () {
return import('../../collections').then(
module => ({default: module.Collections})
);
}
export function Status () {
return import('../../status');
}