diff --git a/public/locales/en.json b/public/locales/en.json index fc93302f..3388f249 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -371,7 +371,6 @@ "self_row_label": "You", "self_row_preview": "Settings & profile", "message_me_label": "me", - "status_e2ee": "e2ee", "username": "Username", "username_placeholder": "username", "server": "Server", diff --git a/public/locales/ru.json b/public/locales/ru.json index da58ca0f..56f6a7e3 100644 --- a/public/locales/ru.json +++ b/public/locales/ru.json @@ -373,7 +373,6 @@ "self_row_label": "Я", "self_row_preview": "Настройки и профиль", "message_me_label": "я", - "status_e2ee": "e2ee", "username": "Имя пользователя", "username_placeholder": "username", "server": "Сервер", diff --git a/src/app/pages/client/direct/Direct.tsx b/src/app/pages/client/direct/Direct.tsx index f08f9f2c..3f2489bc 100644 --- a/src/app/pages/client/direct/Direct.tsx +++ b/src/app/pages/client/direct/Direct.tsx @@ -1,12 +1,10 @@ -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAtomValue } from 'jotai'; -import { Box, Button, Icon, Icons, Text, color, config, toRem } from 'folds'; +import { Box, Button, Icon, Icons, Text, color, toRem } from 'folds'; import { useVirtualizer } from '@tanstack/react-virtual'; import { useNavigate } from 'react-router-dom'; -import { SyncState } from 'matrix-js-sdk'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; -import { useSyncState } from '../../../hooks/useSyncState'; import { factoryRoomIdByActivity } from '../../../utils/sort'; import { NavCategory, NavEmptyCenter, NavEmptyLayout } from '../../../components/nav'; import { getDirectCreatePath, getDirectRoomPath } from '../../pathUtils'; @@ -27,8 +25,6 @@ import { DirectStreamHeader } from './DirectStreamHeader'; import { DirectNewChatRow } from './DirectNewChatRow'; import { DirectSelfRow } from './DirectSelfRow'; -const MONO_FONT = '"JetBrains Mono Variable", ui-monospace, monospace'; - type ListItem = | { kind: 'invite'; entry: DirectInviteEntry } | { kind: 'spam-toggle'; spamCount: number; expanded: boolean } @@ -65,67 +61,6 @@ function DirectEmpty() { ); } -function DirectFooterStatus() { - const { t } = useTranslation(); - const mx = useMatrixClient(); - const [syncState, setSyncState] = useState(() => mx.getSyncState()); - useSyncState( - mx, - useCallback((state: SyncState) => { - setSyncState(state); - }, []) - ); - // Re-read post-mount to close the same render-to-effect gap as in - // SyncIndicator — useState initializer runs before useSyncState attaches - // its listener. - useEffect(() => { - setSyncState(mx.getSyncState()); - }, [mx]); - - // Steady-state mapping (same source-of-truth philosophy as SyncIndicator): - // - SDK Syncing → green dot, all is well - // - SDK Error → red dot, give-up state - // - everything else (transitional Reconnecting / Catchup / etc) → muted - // `currentColor` so the dot reads as a transitional gray under the - // parent's 0.45 opacity. - const dotBackground = - syncState === SyncState.Error - ? color.Critical.Main - : syncState === SyncState.Syncing - ? color.Success.Main - : 'currentColor'; - - return ( - - - vojo.chat - - {t('Direct.status_e2ee')} - - ); -} - type SpamToggleRowProps = { spamCount: number; expanded: boolean; @@ -344,7 +279,6 @@ export function Direct() { )} - ); }