import { useDispatch, useSelector } from "react-redux"; import { InitState, setPreferences, UserPreferences } from "State/Login"; import { RootState } from "State/Store"; import "./Preferences.css"; const PreferencesPage = () => { const dispatch = useDispatch(); const perf = useSelector(s => s.login.preferences); return (

Preferences

Theme
Automatically load media
Media in posts will automatically be shown, if disabled only the link will show
dispatch(setPreferences({ ...perf, autoLoadMedia: e.target.checked }))} />
Image proxy service
Use imgproxy to compress images
dispatch(setPreferences({ ...perf, imgProxyConfig: e.target.checked ? InitState.preferences.imgProxyConfig : null }))} />
{perf.imgProxyConfig && (
Service Url
dispatch(setPreferences({ ...perf, imgProxyConfig: { ...perf.imgProxyConfig!, url: e.target.value } }))} />
Service Key
dispatch(setPreferences({ ...perf, imgProxyConfig: { ...perf.imgProxyConfig!, key: e.target.value } }))} />
Service Salt
dispatch(setPreferences({ ...perf, imgProxyConfig: { ...perf.imgProxyConfig!, salt: e.target.value } }))} />
)}
Enable reactions
Reactions will be shown on every page, if disabled no reactions will be shown
dispatch(setPreferences({ ...perf, enableReactions: e.target.checked }))} />
Confirm reposts
Reposts need to be manually confirmed
dispatch(setPreferences({ ...perf, confirmReposts: e.target.checked }))} />
Automatically show latest notes
Notes will stream in real time into global and posts tab
dispatch(setPreferences({ ...perf, autoShowLatest: e.target.checked }))} />
File upload service
Pick which upload service you want to upload attachments to
Debug Menus
Shows "Copy ID" and "Copy Event JSON" in the context menu on each message
dispatch(setPreferences({ ...perf, showDebugMenus: e.target.checked }))} />
) } export default PreferencesPage;