import { Label } from '@/components/ui/label' import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select' import { Switch } from '@/components/ui/switch' import { FONT_SIZE, MEDIA_AUTO_LOAD_POLICY, NOTIFICATION_LIST_STYLE, RANDOM_PUBLISH_RELAY_COUNT } from '@/constants' import { LocalizedLanguageNames, TLanguage } from '@/i18n' import SecondaryPageLayout from '@/layouts/SecondaryPageLayout' import { cn, isSupportCheckConnectionType } from '@/lib/utils' import { useContentPolicy } from '@/providers/ContentPolicyProvider' import { useFontSize } from '@/providers/FontSizeProvider' import { useTheme } from '@/providers/ThemeProvider' import { useUserPreferences } from '@/providers/UserPreferencesProvider' import { useUserTrust } from '@/providers/UserTrustProvider' import { TMediaAutoLoadPolicy } from '@/types' import { SelectValue } from '@radix-ui/react-select' import { ExternalLink } from 'lucide-react' import { forwardRef, HTMLProps, useState } from 'react' import { useTranslation } from 'react-i18next' const GeneralSettingsPage = forwardRef(({ index, hideTitlebar = false }: { index?: number; hideTitlebar?: boolean }, ref) => { const { t, i18n } = useTranslation() const [language, setLanguage] = useState(i18n.language as TLanguage) const { themeSetting, setThemeSetting } = useTheme() const { fontSize, setFontSize } = useFontSize() const { autoplay, setAutoplay, defaultShowNsfw, setDefaultShowNsfw, hideContentMentioningMutedUsers, setHideContentMentioningMutedUsers, mediaAutoLoadPolicy, setMediaAutoLoadPolicy } = useContentPolicy() const { hideUntrustedNotes, updateHideUntrustedNotes } = useUserTrust() const { notificationListStyle, updateNotificationListStyle, addRandomRelaysToPublish, updateAddRandomRelaysToPublish } = useUserPreferences() const handleLanguageChange = (value: TLanguage) => { i18n.changeLanguage(value) setLanguage(value) } return (
{/* DEPRECATED: Double-panel setting removed for technical debt reduction */}
{t('Custom emoji management')}
{t('After changing emojis, you may need to refresh the page')}
) }) GeneralSettingsPage.displayName = 'GeneralSettingsPage' export default GeneralSettingsPage const SettingItem = forwardRef>( ({ children, className, ...props }, ref) => { return (
{children}
) } ) SettingItem.displayName = 'SettingItem'