import { useDispatch, useSelector } from "react-redux"; import { DefaultImgProxy, 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 for selected people, otherwise only the link will show
Image proxy service
Use imgproxy to compress images
dispatch( setPreferences({ ...perf, imgProxyConfig: e.target.checked ? DefaultImgProxy : 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;