A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(app): call the discovery page Explore in shell copy
Hampus07500b3e10a9
diff --git a/fluxer_app/src/features/app/components/layout/DiscoveryGuildHeader.tsx b/fluxer_app/src/features/app/components/layout/DiscoveryGuildHeader.tsxindex b30722620..46a2b7316 100644--- a/fluxer_app/src/features/app/components/layout/DiscoveryGuildHeader.tsx+++ b/fluxer_app/src/features/app/components/layout/DiscoveryGuildHeader.tsx@@ -8,7 +8,7 @@ import {useLingui} from '@lingui/react/macro';const EXPLORE_DESCRIPTOR = msg({message: 'Explore',- comment: 'Short label in the app layout discovery guild header.',+ comment: 'Short label in the Explore page header.',});export function DiscoveryGuildHeader() {diff --git a/fluxer_app/src/features/app/components/layout/sidebar_nav/DiscoveryButton.tsx b/fluxer_app/src/features/app/components/layout/sidebar_nav/DiscoveryButton.tsxindex c9a067a10..c3b8e7f0c 100644--- a/fluxer_app/src/features/app/components/layout/sidebar_nav/DiscoveryButton.tsx+++ b/fluxer_app/src/features/app/components/layout/sidebar_nav/DiscoveryButton.tsx@@ -19,7 +19,7 @@ import {useCallback, useRef} from 'react';const EXPLORE_COMMUNITIES_DESCRIPTOR = msg({message: 'Explore communities',- comment: 'Short label in the sidebar navigation discovery button.',+ comment: 'Short label in the sidebar button that opens Explore.',});export const DiscoveryButton = observer(() => {const {i18n} = useLingui();diff --git a/fluxer_app/src/features/navigation/utils/AppPageLinks.ts b/fluxer_app/src/features/navigation/utils/AppPageLinks.tsindex f428c77ca..ecec4387d 100644--- a/fluxer_app/src/features/navigation/utils/AppPageLinks.ts+++ b/fluxer_app/src/features/navigation/utils/AppPageLinks.ts@@ -10,27 +10,27 @@ import {getPremiumProductFullName, shouldShowPremiumFeatures} from '@app/featureimport {APP_PROTOCOL_SCHEME, isAppProtocolUrl} from '@app/features/ui/utils/AppProtocol';import type {I18n} from '@lingui/core';import {msg} from '@lingui/core/macro';-import {ChatsCircleIcon, CompassIcon, CrownIcon, type Icon, StarIcon} from '@phosphor-icons/react';+import {AtomIcon, ChatsCircleIcon, CompassIcon, type Icon, StarIcon} from '@phosphor-icons/react';export type AppPageId = 'discovery' | 'plutonium' | 'favorites' | 'direct_messages';interface AppPageDefinition {id: AppPageId;- path: string;+ paths: ReadonlyArray<string>;icon: Icon;appHostOnly: boolean;}const DISCOVERY_PAGE_DESCRIPTOR = msg({- message: 'Discovery',- comment: 'Name of the Discovery page, shown in an inline chat link that opens it.',+ message: 'Explore',+ comment: 'Name of the Explore page, shown in an inline chat link that opens it.',});const APP_PAGES: ReadonlyArray<AppPageDefinition> = [- {id: 'discovery', path: Routes.DISCOVER, icon: CompassIcon, appHostOnly: false},- {id: 'plutonium', path: Routes.PLUTONIUM, icon: CrownIcon, appHostOnly: true},- {id: 'favorites', path: Routes.FAVORITES, icon: StarIcon, appHostOnly: false},- {id: 'direct_messages', path: Routes.ME, icon: ChatsCircleIcon, appHostOnly: false},+ {id: 'discovery', paths: [Routes.DISCOVER, Routes.LEGACY_DISCOVER], icon: CompassIcon, appHostOnly: false},+ {id: 'plutonium', paths: [Routes.PLUTONIUM], icon: AtomIcon, appHostOnly: true},+ {id: 'favorites', paths: [Routes.FAVORITES], icon: StarIcon, appHostOnly: false},+ {id: 'direct_messages', paths: [Routes.ME], icon: ChatsCircleIcon, appHostOnly: false},];const OFFICIAL_WEB_APP_HOSTS = ['web.fluxer.app', 'web.canary.fluxer.app'];@@ -50,7 +50,7 @@ function isWebAppHost(host: string): boolean {try {if (normalized === new URL(RuntimeConfig.webAppBaseUrl).host.toLowerCase()) return true;} catch {}- return OFFICIAL_WEB_APP_HOSTS.includes(normalized);+ return !RuntimeConfig.isSelfHosted() && OFFICIAL_WEB_APP_HOSTS.includes(normalized);}function isPageAvailable(page: AppPageDefinition): boolean {@@ -62,7 +62,7 @@ function isPageAvailable(page: AppPageDefinition): boolean {function findPageByPath(pathname: string): AppPageDefinition | null {const path = normalizePath(pathname);- return APP_PAGES.find((page) => page.path === path && isPageAvailable(page)) ?? null;+ return APP_PAGES.find((page) => page.paths.includes(path) && isPageAvailable(page)) ?? null;}export function parseAppPagePath(path: string): AppPageId | null {diff --git a/fluxer_app/src/features/navigation/utils/DeepLinkUtils.ts b/fluxer_app/src/features/navigation/utils/DeepLinkUtils.tsindex fff50e714..53ad96e34 100644--- a/fluxer_app/src/features/navigation/utils/DeepLinkUtils.ts+++ b/fluxer_app/src/features/navigation/utils/DeepLinkUtils.ts@@ -257,7 +257,7 @@ export function isInternalChannelHost(host: string): boolean {if (webAppHost && normalizedHost === webAppHost) {return true;}- return OFFICIAL_INTERNAL_APP_HOSTS.includes(normalizedHost);+ return !RuntimeConfig.isSelfHosted() && OFFICIAL_INTERNAL_APP_HOSTS.includes(normalizedHost);}export function parseChannelUrl(url: string): string | null {