diff --git a/package.json b/package.json index d7f2b6509..41a0b5172 100644 --- a/package.json +++ b/package.json @@ -156,14 +156,14 @@ "react-overlays": "^0.9.0", "react-popper": "^2.3.0", "react-redux": "^9.0.4", - "react-router-dom": "^5.3.0", - "react-router-dom-v5-compat": "^6.6.2", + "react-router-dom": "^5.3.4", + "react-router-dom-v5-compat": "^6.24.1", "react-router-scroll-4": "^1.0.0-beta.2", "react-simple-pull-to-refresh": "^1.3.3", "react-sparklines": "^1.7.0", "react-sticky-box": "^2.0.0", "react-swipeable-views": "^0.14.0", - "react-virtuoso": "^4.3.11", + "react-virtuoso": "^4.7.12", "redux": "^5.0.0", "redux-immutable": "^4.0.0", "redux-thunk": "^3.1.0", @@ -229,5 +229,6 @@ "glob-parent": "^6.0.1", "jsonwebtoken": "^9.0.0", "loader-utils": "^2.0.3" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/locales/en.json b/src/locales/en.json index 80b928698..9e340d205 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1156,6 +1156,7 @@ "poll_button.add_poll": "Add a poll", "poll_button.remove_poll": "Remove poll", "preferences.fields.auto_play_gif_label": "Auto-play animated GIFs", + "preferences.fields.auto_translate_label": "Automatically translate posts in unknown languages", "preferences.fields.autoload_more_label": "Automatically load more items when scrolled to the bottom of the page", "preferences.fields.autoload_timelines_label": "Automatically load new posts when scrolled to the top of the page", "preferences.fields.boost_modal_label": "Show confirmation dialog before reposting", @@ -1167,6 +1168,7 @@ "preferences.fields.display_media.default": "Hide posts marked as sensitive", "preferences.fields.display_media.hide_all": "Always hide media posts", "preferences.fields.display_media.show_all": "Always show posts", + "preferences.fields.known_languages_label": "Languages you know", "preferences.fields.language_label": "Display Language", "preferences.fields.media_display_label": "Sensitive content", "preferences.fields.missing_description_modal_label": "Show confirmation dialog before sending a post without media descriptions", @@ -1316,6 +1318,8 @@ "security.update_email.success": "Email successfully updated.", "security.update_password.fail": "Update password failed.", "security.update_password.success": "Password successfully updated.", + "select.no_options": "No options available", + "select.placeholder": "Select", "select_bookmark_folder_modal.header_title": "Select folder", "settings.account_migration": "Move Account", "settings.blocks": "Blocks", diff --git a/src/queries/chats.ts b/src/queries/chats.ts index bbfa5fd4d..bb087285e 100644 --- a/src/queries/chats.ts +++ b/src/queries/chats.ts @@ -5,7 +5,7 @@ import { importFetchedAccount, importFetchedAccounts } from 'soapbox/actions/imp import { getNextLink } from 'soapbox/api'; import { ChatWidgetScreens, useChatContext } from 'soapbox/contexts/chat-context'; import { useStatContext } from 'soapbox/contexts/stat-context'; -import { useApi, useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'soapbox/hooks'; +import { useApi, useAppDispatch, useAppSelector, useFeatures, useLoggedIn, useOwnAccount } from 'soapbox/hooks'; import { normalizeChatMessage } from 'soapbox/normalizers'; import { ChatMessage } from 'soapbox/types/entities'; import { reOrderChatListItems } from 'soapbox/utils/chats'; @@ -87,6 +87,7 @@ const useChats = () => { const features = useFeatures(); const { setUnreadChatsCount } = useStatContext(); const fetchRelationships = useFetchRelationships(); + const { me } = useLoggedIn(); const getChats = async (pageParam?: any): Promise> => { const endpoint = features.chatsV2 ? '/api/v2/pleroma/chats' : '/api/v1/pleroma/chats'; @@ -115,7 +116,7 @@ const useChats = () => { queryKey: ['chats', 'search'], queryFn: ({ pageParam }) => getChats(pageParam), placeholderData: keepPreviousData, - enabled: features.chats, + enabled: features.chats && !!me, initialPageParam: { link: undefined as string | undefined }, getNextPageParam: (config) => { if (config.hasMore) { diff --git a/src/utils/features.ts b/src/utils/features.ts index 2debcd8a0..aab9040ac 100644 --- a/src/utils/features.ts +++ b/src/utils/features.ts @@ -358,6 +358,7 @@ const getInstanceFeatures = (instance: Instance) => { v.software === ICESHRIMP, v.software === MASTODON && gte(v.version, '3.5.0'), v.software === TAKAHE && gte(v.version, '0.8.0'), + v.software === MITRA, features.includes('editing'), ]), @@ -491,6 +492,7 @@ const getInstanceFeatures = (instance: Instance) => { followRequests: any([ v.software === MASTODON, v.software === PLEROMA, + v.software === MITRA, ]), /** @@ -712,6 +714,7 @@ const getInstanceFeatures = (instance: Instance) => { profileDirectory: any([ v.software === FRIENDICA, v.software === MASTODON && gte(v.compatVersion, '3.0.0'), + v.software === MITRA, features.includes('profile_directory'), ]), @@ -723,6 +726,7 @@ const getInstanceFeatures = (instance: Instance) => { v.software === MASTODON, v.software === PLEROMA, v.software === TAKAHE && gte(v.version, '0.7.0'), + v.software === MITRA, ]), /** @@ -779,6 +783,7 @@ const getInstanceFeatures = (instance: Instance) => { richText: any([ v.software === MASTODON && v.build === GLITCH, v.software === PLEROMA, + v.software === MITRA, ]), /**