kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Rename from "Explorer" to "Explore"
rodzic
99e352ab68
commit
db8f0044e2
|
@ -166,9 +166,9 @@ const SidebarNavigation = () => {
|
|||
)}
|
||||
|
||||
<SidebarNavigationLink
|
||||
to='/explorer'
|
||||
to='/explore'
|
||||
icon={compassIcon}
|
||||
text={<FormattedMessage id='tabs_bar.search' defaultMessage='Explorer' />}
|
||||
text={<FormattedMessage id='tabs_bar.search' defaultMessage='Explore' />}
|
||||
/>
|
||||
|
||||
{account && (
|
||||
|
|
|
@ -96,8 +96,8 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
|||
|
||||
<ThumbNavigationLink
|
||||
src={compassIcon}
|
||||
text={<FormattedMessage id='navigation.search' defaultMessage='Explorer' />}
|
||||
to='/explorer'
|
||||
text={<FormattedMessage id='navigation.search' defaultMessage='Explore' />}
|
||||
to='/explore'
|
||||
exact
|
||||
/>
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
|
||||
const onSearch = () => {
|
||||
dispatch(setSearchAccount(account.id));
|
||||
history.push('/explorer');
|
||||
history.push('/explore');
|
||||
};
|
||||
|
||||
const onAvatarClick = () => {
|
||||
|
|
|
@ -10,7 +10,7 @@ import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
|||
|
||||
const messages = defineMessages({
|
||||
search: { id: 'aliases.search', defaultMessage: 'Search your old account' },
|
||||
searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Explorer' },
|
||||
searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Explore' },
|
||||
});
|
||||
|
||||
const Search: React.FC = () => {
|
||||
|
|
|
@ -76,7 +76,7 @@ const SearchZapSplit = (props: ISearchZapSplit) => {
|
|||
dispatch(setSearchAccount(null));
|
||||
dispatch(submitSearch());
|
||||
|
||||
history.push('/explorer');
|
||||
history.push('/explore');
|
||||
} else {
|
||||
dispatch(submitSearch());
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
import AutosuggestAccountInput from 'soapbox/components/autosuggest-account-input.tsx';
|
||||
import Input from 'soapbox/components/ui/input.tsx';
|
||||
import SvgIcon from 'soapbox/components/ui/svg-icon.tsx';
|
||||
import { formatFilters } from 'soapbox/features/explorer/components/explorerFilter.tsx';
|
||||
import { formatFilters } from 'soapbox/features/explore/components/exploreFilter.tsx';
|
||||
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
||||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||
import { selectAccount } from 'soapbox/selectors/index.ts';
|
||||
|
@ -71,7 +71,7 @@ const Search = (props: ISearch) => {
|
|||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const { value } = event.target;
|
||||
|
||||
if (formatFiltersString.length > 0 && path === '/explorer') {
|
||||
if (formatFiltersString.length > 0 && path === '/explore') {
|
||||
dispatch(changeSearch(`${formatFiltersString} ${value}`));
|
||||
} else {
|
||||
dispatch(changeSearch(value));
|
||||
|
@ -96,7 +96,7 @@ const Search = (props: ISearch) => {
|
|||
dispatch(setSearchAccount(null));
|
||||
dispatch(submitSearch());
|
||||
|
||||
history.push('/explorer');
|
||||
history.push('/explore');
|
||||
} else {
|
||||
dispatch(submitSearch());
|
||||
}
|
||||
|
|
|
@ -10,27 +10,27 @@ import SvgIcon from 'soapbox/components/ui/svg-icon.tsx';
|
|||
import Text from 'soapbox/components/ui/text.tsx';
|
||||
|
||||
const messages = defineMessages({
|
||||
welcomeTitle: { id: 'column.explorer.welcome_card.title', defaultMessage: 'Welcome to Explorer' },
|
||||
welcomeText: { id: 'column.explorer.welcome_card.text', defaultMessage: 'Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.' },
|
||||
nostrTitle: { id: 'column.explorer.nostr', defaultMessage: 'Nostr' },
|
||||
bridgeTitle: { id: 'column.explorer.bridge', defaultMessage: 'Bridges' },
|
||||
welcomeTitle: { id: 'column.explore.welcome_card.title', defaultMessage: 'Welcome to Explore' },
|
||||
welcomeText: { id: 'column.explore.welcome_card.text', defaultMessage: 'Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.' },
|
||||
nostrTitle: { id: 'column.explore.nostr', defaultMessage: 'Nostr' },
|
||||
bridgeTitle: { id: 'column.explore.bridge', defaultMessage: 'Bridges' },
|
||||
});
|
||||
|
||||
const ExplorerCards = () => {
|
||||
const ExploreCards = () => {
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
const intl = useIntl();
|
||||
|
||||
const handleClick = () => {
|
||||
setIsOpen((prev) => {
|
||||
const newValue = !prev;
|
||||
localStorage.setItem('soapbox:explorer:card:status', JSON.stringify(!isOpen));
|
||||
localStorage.setItem('soapbox:explore:card:status', JSON.stringify(!isOpen));
|
||||
return newValue;
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(
|
||||
() => {
|
||||
const value = localStorage.getItem('soapbox:explorer:card:status');
|
||||
const value = localStorage.getItem('soapbox:explore:card:status');
|
||||
if (value !== null) {
|
||||
setIsOpen(JSON.parse(value));
|
||||
}
|
||||
|
@ -71,4 +71,4 @@ const ExplorerCards = () => {
|
|||
};
|
||||
|
||||
|
||||
export default ExplorerCards;
|
||||
export default ExploreCards;
|
|
@ -15,7 +15,7 @@ import {
|
|||
PlatformFilters,
|
||||
ToggleRepliesFilter,
|
||||
generateFilter,
|
||||
} from 'soapbox/features/explorer/components/filters.tsx';
|
||||
} from 'soapbox/features/explore/components/filters.tsx';
|
||||
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
||||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||
import { IFilters } from 'soapbox/reducers/search-filter.ts';
|
||||
|
@ -35,7 +35,7 @@ export const formatFilters = (filters: IFilters[]): string => {
|
|||
return [language, protocols, defaultFilters, newFilters].join(' ').trim();
|
||||
};
|
||||
|
||||
const ExplorerFilter = () => {
|
||||
const ExploreFilter = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const filters = useAppSelector((state) => state.search_filter);
|
||||
const intl = useIntl();
|
||||
|
@ -44,7 +44,7 @@ const ExplorerFilter = () => {
|
|||
const handleClick = () => {
|
||||
setIsOpen((prev) => {
|
||||
const newValue = !prev;
|
||||
localStorage.setItem('soapbox:explorer:filter:status', JSON.stringify(newValue));
|
||||
localStorage.setItem('soapbox:explore:filter:status', JSON.stringify(newValue));
|
||||
return newValue;
|
||||
});
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ const ExplorerFilter = () => {
|
|||
() => {
|
||||
const value = formatFilters(filters);
|
||||
|
||||
localStorage.setItem('soapbox:explorer:filters', JSON.stringify(filters));
|
||||
localStorage.setItem('soapbox:explore:filters', JSON.stringify(filters));
|
||||
|
||||
debouncedSearch(value);
|
||||
|
||||
|
@ -74,7 +74,7 @@ const ExplorerFilter = () => {
|
|||
|
||||
useEffect(
|
||||
() => {
|
||||
const isOpenStatus = localStorage.getItem('soapbox:explorer:filter:status');
|
||||
const isOpenStatus = localStorage.getItem('soapbox:explore:filter:status');
|
||||
if (isOpenStatus !== null) {
|
||||
setIsOpen(JSON.parse(isOpenStatus));
|
||||
}
|
||||
|
@ -127,5 +127,5 @@ const ExplorerFilter = () => {
|
|||
};
|
||||
|
||||
|
||||
export default ExplorerFilter;
|
||||
export default ExploreFilter;
|
||||
export type { IGenerateFilter };
|
|
@ -14,7 +14,7 @@ import Stack from 'soapbox/components/ui/stack.tsx';
|
|||
import SvgIcon from 'soapbox/components/ui/svg-icon.tsx';
|
||||
import Text from 'soapbox/components/ui/text.tsx';
|
||||
import Toggle from 'soapbox/components/ui/toggle.tsx';
|
||||
import { IGenerateFilter } from 'soapbox/features/explorer/components/explorerFilter.tsx';
|
||||
import { IGenerateFilter } from 'soapbox/features/explore/components/exploreFilter.tsx';
|
||||
import { SelectDropdown } from 'soapbox/features/forms/index.tsx';
|
||||
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
||||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||
|
@ -23,28 +23,28 @@ import { AppDispatch, RootState } from 'soapbox/store.ts';
|
|||
import toast from 'soapbox/toast.tsx';
|
||||
|
||||
const messages = defineMessages({
|
||||
noReplies: { id: 'column.explorer.filters.no_replies', defaultMessage: 'No Replies:' },
|
||||
media: { id: 'column.explorer.filters.media', defaultMessage: 'Media:' },
|
||||
language: { id: 'column.explorer.filters.language', defaultMessage: 'Language:' },
|
||||
platforms: { id: 'column.explorer.filters.platforms', defaultMessage: 'Platforms:' },
|
||||
atLeast: { id: 'column.explorer.filters.atLeast', defaultMessage: 'At least one platform must remain selected.' },
|
||||
createYourFilter: { id: 'column.explorer.filters.create_your_filter', defaultMessage: 'Create your filter' },
|
||||
resetFilter: { id: 'column.explorer.filters.reset', defaultMessage: 'Reset Filters' },
|
||||
filterByWords: { id: 'column.explorer.filters.filter_by_words', defaultMessage: 'Filter by this/these words' },
|
||||
include: { id: 'column.explorer.filters.include', defaultMessage: 'Include' },
|
||||
exclude: { id: 'column.explorer.filters.exclude', defaultMessage: 'Exclude' },
|
||||
nostr: { id: 'column.explorer.filters.nostr', defaultMessage: 'Nostr' },
|
||||
bluesky: { id: 'column.explorer.filters.bluesky', defaultMessage: 'Bluesky' },
|
||||
fediverse: { id: 'column.explorer.filters.fediverse', defaultMessage: 'Fediverse' },
|
||||
cancel: { id: 'column.explorer.filters.cancel', defaultMessage: 'Cancel' },
|
||||
addFilter: { id: 'column.explorer.filters.add_filter', defaultMessage: 'Add Filter' },
|
||||
all: { id: 'column.explorer.media_filters.all', defaultMessage: 'All' },
|
||||
imageOnly: { id: 'column.explorer.media_filters.image', defaultMessage: 'Image only' },
|
||||
videoOnly: { id: 'column.explorer.media_filters.video', defaultMessage: 'Video only' },
|
||||
none: { id: 'column.explorer.media_filters.none', defaultMessage: 'No media' },
|
||||
clearSearch: { id: 'column.explorer.filters.clear_input', defaultMessage: 'Clear filter input' },
|
||||
removeFilter: { id: 'column.explorer.filters.remove_filter', defaultMessage: 'Remove filter: {name}' },
|
||||
empty: { id: 'column.explorer.filters.empty', defaultMessage: 'Hey there... You forget to write the filter!' },
|
||||
noReplies: { id: 'column.explore.filters.no_replies', defaultMessage: 'No Replies:' },
|
||||
media: { id: 'column.explore.filters.media', defaultMessage: 'Media:' },
|
||||
language: { id: 'column.explore.filters.language', defaultMessage: 'Language:' },
|
||||
platforms: { id: 'column.explore.filters.platforms', defaultMessage: 'Platforms:' },
|
||||
atLeast: { id: 'column.explore.filters.atLeast', defaultMessage: 'At least one platform must remain selected.' },
|
||||
createYourFilter: { id: 'column.explore.filters.create_your_filter', defaultMessage: 'Create your filter' },
|
||||
resetFilter: { id: 'column.explore.filters.reset', defaultMessage: 'Reset Filters' },
|
||||
filterByWords: { id: 'column.explore.filters.filter_by_words', defaultMessage: 'Filter by this/these words' },
|
||||
include: { id: 'column.explore.filters.include', defaultMessage: 'Include' },
|
||||
exclude: { id: 'column.explore.filters.exclude', defaultMessage: 'Exclude' },
|
||||
nostr: { id: 'column.explore.filters.nostr', defaultMessage: 'Nostr' },
|
||||
bluesky: { id: 'column.explore.filters.bluesky', defaultMessage: 'Bluesky' },
|
||||
fediverse: { id: 'column.explore.filters.fediverse', defaultMessage: 'Fediverse' },
|
||||
cancel: { id: 'column.explore.filters.cancel', defaultMessage: 'Cancel' },
|
||||
addFilter: { id: 'column.explore.filters.add_filter', defaultMessage: 'Add Filter' },
|
||||
all: { id: 'column.explore.media_filters.all', defaultMessage: 'All' },
|
||||
imageOnly: { id: 'column.explore.media_filters.image', defaultMessage: 'Image only' },
|
||||
videoOnly: { id: 'column.explore.media_filters.video', defaultMessage: 'Video only' },
|
||||
none: { id: 'column.explore.media_filters.none', defaultMessage: 'No media' },
|
||||
clearSearch: { id: 'column.explore.filters.clear_input', defaultMessage: 'Clear filter input' },
|
||||
removeFilter: { id: 'column.explore.filters.remove_filter', defaultMessage: 'Remove filter: {name}' },
|
||||
empty: { id: 'column.explore.filters.empty', defaultMessage: 'Hey there... You forget to write the filter!' },
|
||||
});
|
||||
|
||||
const languages = {
|
||||
|
@ -190,7 +190,7 @@ const CreateFilter = () => {
|
|||
|
||||
const handleReset = () => {
|
||||
dispatch(resetFilters());
|
||||
localStorage.removeItem('soapbox:explorer:filters');
|
||||
localStorage.removeItem('soapbox:explore:filters');
|
||||
};
|
||||
|
||||
const handleClearValue = () => {
|
||||
|
@ -471,7 +471,7 @@ const generateFilter = (dispatch: AppDispatch, intl: IntlShape, { name, value, s
|
|||
key={name}
|
||||
className={`group m-1 flex items-center whitespace-normal break-words rounded-full border-2 bg-transparent px-3 pr-1 text-base font-medium shadow-sm hover:cursor-pointer ${borderColor} ${textColor} `}
|
||||
>
|
||||
{name.toLowerCase() !== 'default' ? name : <FormattedMessage id='column.explorer.filters.language.default' defaultMessage='Global' />}
|
||||
{name.toLowerCase() !== 'default' ? name : <FormattedMessage id='column.explore.filters.language.default' defaultMessage='Global' />}
|
||||
<IconButton
|
||||
iconClassName='!w-4' className={` !py-0 group-hover:block ${textColor}`} src={xIcon}
|
||||
onClick={handleChangeFilters}
|
|
@ -22,10 +22,10 @@ import {
|
|||
import 'swiper/swiper-bundle.css';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.explorer.popular_accounts', defaultMessage: 'Popular Accounts' },
|
||||
collapse: { id: 'column.explorer.popular_accounts.collapse', defaultMessage: 'Collapse popular accounts' },
|
||||
expand: { id: 'column.explorer.popular_accounts.expand', defaultMessage: 'Expand popular accounts' },
|
||||
error: { id: 'column.explorer.popular_accounts.error', defaultMessage: 'Could not load popular accounts. Please try again later.' },
|
||||
title: { id: 'column.explore.popular_accounts', defaultMessage: 'Popular Accounts' },
|
||||
collapse: { id: 'column.explore.popular_accounts.collapse', defaultMessage: 'Collapse popular accounts' },
|
||||
expand: { id: 'column.explore.popular_accounts.expand', defaultMessage: 'Expand popular accounts' },
|
||||
error: { id: 'column.explore.popular_accounts.error', defaultMessage: 'Could not load popular accounts. Please try again later.' },
|
||||
});
|
||||
|
||||
const PopularAccounts = ({ id }: { id: string }) => {
|
||||
|
@ -86,14 +86,14 @@ const AccountsCarousel = () => {
|
|||
const handleClick = () => {
|
||||
setIsOpen((prev) => {
|
||||
const newValue = !prev;
|
||||
localStorage.setItem('soapbox:explorer:accounts:status', JSON.stringify(newValue));
|
||||
localStorage.setItem('soapbox:explore:accounts:status', JSON.stringify(newValue));
|
||||
return newValue;
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(
|
||||
() => {
|
||||
const isOpenStatus = localStorage.getItem('soapbox:explorer:accounts:status');
|
||||
const isOpenStatus = localStorage.getItem('soapbox:explore:accounts:status');
|
||||
if (isOpenStatus) {
|
||||
setIsOpen(JSON.parse(isOpenStatus));
|
||||
}
|
|
@ -13,9 +13,9 @@ import Stack from 'soapbox/components/ui/stack.tsx';
|
|||
import Tabs from 'soapbox/components/ui/tabs.tsx';
|
||||
import SearchResults from 'soapbox/features/compose/components/search-results.tsx';
|
||||
import Search from 'soapbox/features/compose/components/search.tsx';
|
||||
import ExplorerCards from 'soapbox/features/explorer/components/explorer-cards.tsx';
|
||||
import ExplorerFilter from 'soapbox/features/explorer/components/explorerFilter.tsx';
|
||||
import AccountsCarousel from 'soapbox/features/explorer/components/popular-accounts.tsx';
|
||||
import ExploreCards from 'soapbox/features/explore/components/explore-cards.tsx';
|
||||
import ExploreFilter from 'soapbox/features/explore/components/exploreFilter.tsx';
|
||||
import AccountsCarousel from 'soapbox/features/explore/components/popular-accounts.tsx';
|
||||
import { PublicTimeline } from 'soapbox/features/ui/util/async-components.ts';
|
||||
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
||||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||
|
@ -24,11 +24,11 @@ import { IFilters, initialState as filterInitialState } from 'soapbox/reducers/s
|
|||
import { SearchFilter } from 'soapbox/reducers/search.ts';
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'column.explorer', defaultMessage: 'Explorer' },
|
||||
heading: { id: 'column.explore', defaultMessage: 'Explore' },
|
||||
accounts: { id: 'search_results.accounts', defaultMessage: 'Accounts' },
|
||||
statuses: { id: 'search_results.posts', defaultMessage: 'Posts' },
|
||||
trends: { id: 'search_results.trends', defaultMessage: 'Trends' },
|
||||
filters: { id: 'column.explorer.filters', defaultMessage: 'Filters:' },
|
||||
filters: { id: 'column.explore.filters', defaultMessage: 'Filters:' },
|
||||
});
|
||||
|
||||
const checkFilters = (filters: IFilters[]) => {
|
||||
|
@ -43,7 +43,7 @@ const checkFilters = (filters: IFilters[]) => {
|
|||
const PostsTab = () => {
|
||||
const path = useLocation().pathname;
|
||||
const intl = useIntl();
|
||||
const inPosts = path === '/explorer';
|
||||
const inPosts = path === '/explore';
|
||||
const filters = useAppSelector((state) => state.search_filter);
|
||||
const isNostr = useFeatures().nostr;
|
||||
|
||||
|
@ -58,11 +58,11 @@ const PostsTab = () => {
|
|||
{inPosts && <>
|
||||
|
||||
{isNostr && <>
|
||||
<ExplorerCards />
|
||||
<ExploreCards />
|
||||
|
||||
<Divider text={intl.formatMessage(messages.filters)} />
|
||||
|
||||
<ExplorerFilter />
|
||||
<ExploreFilter />
|
||||
|
||||
<Divider />
|
||||
</> }
|
||||
|
@ -102,7 +102,7 @@ const AccountsTab = () => {
|
|||
};
|
||||
|
||||
|
||||
const SearchPage = () => {
|
||||
const ExplorePage = () => {
|
||||
const features = useFeatures();
|
||||
const intl = useIntl();
|
||||
const dispatch = useAppDispatch();
|
||||
|
@ -112,8 +112,8 @@ const SearchPage = () => {
|
|||
const selectFilter = (newActiveFilter: SearchFilter) => dispatch(setFilter(newActiveFilter));
|
||||
|
||||
const selectedValue = useMemo(() => {
|
||||
if (path === '/explorer') return 'posts';
|
||||
if (path === '/explorer/trends') return 'statuses';
|
||||
if (path === '/explore') return 'posts';
|
||||
if (path === '/explore/trends') return 'statuses';
|
||||
return 'accounts';
|
||||
}, [path]);
|
||||
|
||||
|
@ -155,7 +155,7 @@ const SearchPage = () => {
|
|||
selectFilter('statuses');
|
||||
}
|
||||
setSelectedFilter(filter ?? 'posts');
|
||||
navigate(`/explorer${path}`);
|
||||
navigate(`/explore${path}`);
|
||||
};
|
||||
|
||||
return <Tabs items={items} activeItem={selectedFilter} />;
|
||||
|
@ -171,9 +171,9 @@ const SearchPage = () => {
|
|||
</div>
|
||||
|
||||
<Switch>
|
||||
<Route exact path={'/explorer'} component={PostsTab} />
|
||||
{features.nostr && <Route path={'/explorer/trends'} component={TrendsTab} />}
|
||||
<Route path={'/explorer/accounts'} component={AccountsTab} />
|
||||
<Route exact path={'/explore'} component={PostsTab} />
|
||||
{features.nostr && <Route path={'/explore/trends'} component={TrendsTab} />}
|
||||
<Route path={'/explore/accounts'} component={AccountsTab} />
|
||||
</Switch>
|
||||
|
||||
</Stack>
|
||||
|
@ -182,4 +182,4 @@ const SearchPage = () => {
|
|||
);
|
||||
};
|
||||
|
||||
export default SearchPage;
|
||||
export default ExplorePage;
|
|
@ -13,7 +13,7 @@ import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
|||
|
||||
const messages = defineMessages({
|
||||
search: { id: 'lists.search', defaultMessage: 'Search among people you follow' },
|
||||
searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Explorer' },
|
||||
searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Explore' },
|
||||
});
|
||||
|
||||
const Search = () => {
|
||||
|
|
|
@ -38,7 +38,7 @@ const TrendsPanel = ({ limit }: ITrendsPanel) => {
|
|||
<Widget
|
||||
title={<FormattedMessage id='trends.title' defaultMessage='Trends' />}
|
||||
action={
|
||||
<Link className='text-right' to='/explorer' onClick={setHashtagsFilter}>
|
||||
<Link className='text-right' to='/explore' onClick={setHashtagsFilter}>
|
||||
<Text tag='span' theme='primary' size='sm' className='hover:underline'>
|
||||
{intl.formatMessage(messages.viewAll)}
|
||||
</Text>
|
||||
|
|
|
@ -39,7 +39,7 @@ import LandingPage from 'soapbox/pages/landing-page.tsx';
|
|||
import ManageGroupsPage from 'soapbox/pages/manage-groups-page.tsx';
|
||||
import ProfilePage from 'soapbox/pages/profile-page.tsx';
|
||||
import RemoteInstancePage from 'soapbox/pages/remote-instance-page.tsx';
|
||||
import SearchPage from 'soapbox/pages/search-page.tsx';
|
||||
import ExplorePage from 'soapbox/pages/search-page.tsx';
|
||||
import StatusPage from 'soapbox/pages/status-page.tsx';
|
||||
import WidePage from 'soapbox/pages/wide-page.tsx';
|
||||
|
||||
|
@ -67,7 +67,7 @@ import {
|
|||
Filters,
|
||||
EditFilter,
|
||||
PinnedStatuses,
|
||||
Search,
|
||||
Explore,
|
||||
ListTimeline,
|
||||
Lists,
|
||||
Bookmarks,
|
||||
|
@ -208,11 +208,11 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
|||
<Redirect from='/web/:path' to='/:path' />
|
||||
<Redirect from='/timelines/home' to='/' />
|
||||
<Redirect from='/timelines/public/local' to='/timeline/local' />
|
||||
<Redirect from='/timelines/public' to='/explorer' />
|
||||
<Redirect from='/timelines/public' to='/explore' />
|
||||
<Redirect from='/timelines/direct' to='/messages' />
|
||||
|
||||
{/* Pleroma FE web routes */}
|
||||
<Redirect from='/main/all' to='/explorer' />
|
||||
<Redirect from='/main/all' to='/explore' />
|
||||
<Redirect from='/main/public' to='/timeline/local' />
|
||||
<Redirect from='/main/friends' to='/' />
|
||||
<Redirect from='/tag/:id' to='/tags/:id' />
|
||||
|
@ -250,7 +250,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
|||
<Redirect from='/auth/mfa' to='/settings/mfa' />
|
||||
<Redirect from='/auth/password/new' to='/reset-password' />
|
||||
<Redirect from='/auth/password/edit' to={`/edit-password${search}`} />
|
||||
<Redirect from='/timeline/fediverse' to='/explorer' />
|
||||
<Redirect from='/timeline/fediverse' to='/explore' />
|
||||
|
||||
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
||||
|
||||
|
@ -260,7 +260,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
|||
|
||||
<WrappedRoute path='/notifications' page={DefaultPage} component={Notifications} content={children} />
|
||||
|
||||
<WrappedRoute path='/explorer' page={SearchPage} component={Search} content={children} publicRoute />
|
||||
<WrappedRoute path='/explore' page={ExplorePage} component={Explore} content={children} publicRoute />
|
||||
{features.suggestionsLocal && <WrappedRoute path='/suggestions/local' publicRoute page={DefaultPage} component={FollowRecommendations} content={children} componentParams={{ local: true }} />}
|
||||
{features.suggestions && <WrappedRoute path='/suggestions' exact publicRoute page={DefaultPage} component={FollowRecommendations} content={children} />}
|
||||
{features.profileDirectory && <WrappedRoute path='/directory' exact publicRoute page={DefaultPage} component={Directory} content={children} />}
|
||||
|
|
|
@ -57,7 +57,7 @@ export const BirthdaysModal = lazy(() => import('soapbox/features/ui/components/
|
|||
export const BirthdayPanel = lazy(() => import('soapbox/components/birthday-panel.tsx'));
|
||||
export const ListEditor = lazy(() => import('soapbox/features/list-editor/index.tsx'));
|
||||
export const ListAdder = lazy(() => import('soapbox/features/list-adder/index.tsx'));
|
||||
export const Search = lazy(() => import('soapbox/features/explorer/index.tsx'));
|
||||
export const Explore = lazy(() => import('soapbox/features/explore/index.tsx'));
|
||||
export const LoginPage = lazy(() => import('soapbox/features/auth-login/components/login-page.tsx'));
|
||||
export const ExternalLogin = lazy(() => import('soapbox/features/external-login/index.tsx'));
|
||||
export const LogoutPage = lazy(() => import('soapbox/features/auth-login/components/logout.tsx'));
|
||||
|
|
|
@ -368,39 +368,39 @@
|
|||
"column.event_map": "Event location",
|
||||
"column.event_participants": "Event participants",
|
||||
"column.events": "Events",
|
||||
"column.explorer": "Explorer",
|
||||
"column.explorer.bridge": "Bridges",
|
||||
"column.explorer.filters": "Filters:",
|
||||
"column.explorer.filters.add_filter": "Add Filter",
|
||||
"column.explorer.filters.atLeast": "At least one platform must remain selected.",
|
||||
"column.explorer.filters.bluesky": "Bluesky",
|
||||
"column.explorer.filters.cancel": "Cancel",
|
||||
"column.explorer.filters.clear_input": "Clear filter input",
|
||||
"column.explorer.filters.create_your_filter": "Create your filter",
|
||||
"column.explorer.filters.empty": "Hey there... You forget to write the filter!",
|
||||
"column.explorer.filters.exclude": "Exclude",
|
||||
"column.explorer.filters.fediverse": "Fediverse",
|
||||
"column.explorer.filters.filter_by_words": "Filter by this/these words",
|
||||
"column.explorer.filters.include": "Include",
|
||||
"column.explorer.filters.language": "Language:",
|
||||
"column.explorer.filters.language.default": "Global",
|
||||
"column.explorer.filters.media": "Media:",
|
||||
"column.explorer.filters.no_replies": "No Replies:",
|
||||
"column.explorer.filters.nostr": "Nostr",
|
||||
"column.explorer.filters.platforms": "Platforms:",
|
||||
"column.explorer.filters.remove_filter": "Remove filter: {name}",
|
||||
"column.explorer.filters.reset": "Reset Filters",
|
||||
"column.explorer.media_filters.all": "All",
|
||||
"column.explorer.media_filters.image": "Image only",
|
||||
"column.explorer.media_filters.none": "No media",
|
||||
"column.explorer.media_filters.video": "Video only",
|
||||
"column.explorer.nostr": "Nostr",
|
||||
"column.explorer.popular_accounts": "Popular Accounts",
|
||||
"column.explorer.popular_accounts.collapse": "Collapse popular accounts",
|
||||
"column.explorer.popular_accounts.error": "Could not load popular accounts. Please try again later.",
|
||||
"column.explorer.popular_accounts.expand": "Expand popular accounts",
|
||||
"column.explorer.welcome_card.text": "Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.",
|
||||
"column.explorer.welcome_card.title": "Welcome to Explorer",
|
||||
"column.explore": "Explore",
|
||||
"column.explore.bridge": "Bridges",
|
||||
"column.explore.filters": "Filters:",
|
||||
"column.explore.filters.add_filter": "Add Filter",
|
||||
"column.explore.filters.atLeast": "At least one platform must remain selected.",
|
||||
"column.explore.filters.bluesky": "Bluesky",
|
||||
"column.explore.filters.cancel": "Cancel",
|
||||
"column.explore.filters.clear_input": "Clear filter input",
|
||||
"column.explore.filters.create_your_filter": "Create your filter",
|
||||
"column.explore.filters.empty": "Hey there... You forget to write the filter!",
|
||||
"column.explore.filters.exclude": "Exclude",
|
||||
"column.explore.filters.fediverse": "Fediverse",
|
||||
"column.explore.filters.filter_by_words": "Filter by this/these words",
|
||||
"column.explore.filters.include": "Include",
|
||||
"column.explore.filters.language": "Language:",
|
||||
"column.explore.filters.language.default": "Global",
|
||||
"column.explore.filters.media": "Media:",
|
||||
"column.explore.filters.no_replies": "No Replies:",
|
||||
"column.explore.filters.nostr": "Nostr",
|
||||
"column.explore.filters.platforms": "Platforms:",
|
||||
"column.explore.filters.remove_filter": "Remove filter: {name}",
|
||||
"column.explore.filters.reset": "Reset Filters",
|
||||
"column.explore.media_filters.all": "All",
|
||||
"column.explore.media_filters.image": "Image only",
|
||||
"column.explore.media_filters.none": "No media",
|
||||
"column.explore.media_filters.video": "Video only",
|
||||
"column.explore.nostr": "Nostr",
|
||||
"column.explore.popular_accounts": "Popular Accounts",
|
||||
"column.explore.popular_accounts.collapse": "Collapse popular accounts",
|
||||
"column.explore.popular_accounts.error": "Could not load popular accounts. Please try again later.",
|
||||
"column.explore.popular_accounts.expand": "Expand popular accounts",
|
||||
"column.explore.welcome_card.text": "Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.",
|
||||
"column.explore.welcome_card.title": "Welcome to Explore",
|
||||
"column.export_data": "Export data",
|
||||
"column.familiar_followers": "People you know following {name}",
|
||||
"column.favourited_statuses": "Liked posts",
|
||||
|
@ -1154,7 +1154,7 @@
|
|||
"navigation.direct_messages": "Messages",
|
||||
"navigation.home": "Home",
|
||||
"navigation.notifications": "Notifications",
|
||||
"navigation.search": "Explorer",
|
||||
"navigation.search": "Explore",
|
||||
"navigation_bar.account_aliases": "Account aliases",
|
||||
"navigation_bar.account_migration": "Move account",
|
||||
"navigation_bar.blocks": "Blocks",
|
||||
|
@ -1651,7 +1651,7 @@
|
|||
"tabs_bar.more": "More",
|
||||
"tabs_bar.notifications": "Notifications",
|
||||
"tabs_bar.profile": "Profile",
|
||||
"tabs_bar.search": "Explorer",
|
||||
"tabs_bar.search": "Explore",
|
||||
"tabs_bar.settings": "Settings",
|
||||
"textarea.counter.label": "{count} characters remaining",
|
||||
"theme_editor.colors.accent": "Accent",
|
||||
|
|
|
@ -13,14 +13,14 @@ import {
|
|||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||
import { useFeatures } from 'soapbox/hooks/useFeatures.ts';
|
||||
|
||||
interface ISearchPage {
|
||||
interface IExplorePage {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const SearchPage: React.FC<ISearchPage> = ({ children }) => {
|
||||
const ExplorePage: React.FC<IExplorePage> = ({ children }) => {
|
||||
const me = useAppSelector(state => state.me);
|
||||
const features = useFeatures();
|
||||
const accountsPath = useLocation().pathname === '/explorer/accounts';
|
||||
const accountsPath = useLocation().pathname === '/explore/accounts';
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -56,4 +56,4 @@ const SearchPage: React.FC<ISearchPage> = ({ children }) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default SearchPage;
|
||||
export default ExplorePage;
|
||||
|
|
|
@ -9,9 +9,9 @@ import type { AnyAction } from 'redux';
|
|||
|
||||
const loadState = (pathname: string) => {
|
||||
try {
|
||||
if (pathname !== '/explorer') return undefined;
|
||||
if (pathname !== '/explore') return undefined;
|
||||
|
||||
const savedState = localStorage.getItem('soapbox:explorer:filters');
|
||||
const savedState = localStorage.getItem('soapbox:explore:filters');
|
||||
return savedState ? JSON.parse(savedState) : undefined;
|
||||
} catch (error) {
|
||||
console.error('Failed to load state:', error);
|
||||
|
|
Ładowanie…
Reference in New Issue