mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(premium): serve the Plutonium page at /channels/@premium (#3132)
This commit is contained in:
@@ -34,7 +34,8 @@ export const Routes = {
|
||||
CONNECTION_CALLBACK: '/connection-callback',
|
||||
USER_PROFILE: '/users/:userId',
|
||||
THEME_STUDIO: '/theme-studio',
|
||||
PLUTONIUM: '/plutonium',
|
||||
PLUTONIUM: '/channels/@premium',
|
||||
LEGACY_PLUTONIUM: '/plutonium',
|
||||
terms: () => marketingUrl('terms'),
|
||||
privacy: () => marketingUrl('privacy'),
|
||||
guidelines: () => marketingUrl('guidelines'),
|
||||
@@ -70,11 +71,12 @@ export const Routes = {
|
||||
isDMRoute: (pathname: string) => pathname.startsWith('/channels/@me'),
|
||||
isFavoritesRoute: (pathname: string) => pathname.startsWith('/channels/@favorites'),
|
||||
isDiscoverRoute: (pathname: string) => pathname.startsWith('/channels/@discover'),
|
||||
isPlutoniumRoute: (pathname: string) => pathname === '/plutonium',
|
||||
isChannelRoute: (pathname: string) => pathname.startsWith('/channels/'),
|
||||
isPlutoniumRoute: (pathname: string) => pathname === '/channels/@premium',
|
||||
isChannelRoute: (pathname: string) => pathname.startsWith('/channels/') && !pathname.startsWith('/channels/@premium'),
|
||||
isGuildChannelRoute: (pathname: string) =>
|
||||
pathname.startsWith('/channels/') &&
|
||||
!pathname.startsWith('/channels/@me') &&
|
||||
!pathname.startsWith('/channels/@favorites') &&
|
||||
!pathname.startsWith('/channels/@discover'),
|
||||
!pathname.startsWith('/channels/@discover') &&
|
||||
!pathname.startsWith('/channels/@premium'),
|
||||
} as const;
|
||||
|
||||
@@ -226,6 +226,12 @@ const plutoniumRoute = createRoute({
|
||||
</DMLayout>
|
||||
),
|
||||
});
|
||||
const legacyPlutoniumRoute = createRoute({
|
||||
getParentRoute: () => guildsLayoutRoute,
|
||||
id: 'legacyPlutonium',
|
||||
path: Routes.LEGACY_PLUTONIUM,
|
||||
onEnter: () => new Redirect(Routes.PLUTONIUM),
|
||||
});
|
||||
const userProfileRoute = createRoute({
|
||||
getParentRoute: () => appLayoutRoute,
|
||||
id: 'userProfile',
|
||||
@@ -335,6 +341,7 @@ export const appRouteTree = appLayoutRoute.addChildren([
|
||||
meRoute,
|
||||
discoverRoute,
|
||||
plutoniumRoute,
|
||||
legacyPlutoniumRoute,
|
||||
favoritesRoute.addChildren([favoritesChannelRoute]),
|
||||
channelsRoute.addChildren([membersRoute, channelRoute.addChildren([messageRoute])]),
|
||||
]),
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ function getCurrentInviteDestinationKey(): string | null {
|
||||
if (guildId === '@me') {
|
||||
return channelId ? createBotInviteDestinationKey('group_dm', channelId) : null;
|
||||
}
|
||||
if (guildId !== '@favorites' && guildId !== '@discover') {
|
||||
if (guildId !== '@favorites' && guildId !== '@discover' && guildId !== '@premium') {
|
||||
return createBotInviteDestinationKey('guild', guildId);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user