chore: default imgproxy on

This commit is contained in:
Kieran 2023-02-04 17:24:01 +00:00
parent 529074e0c6
commit afd9dc44d9
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import { useDispatch, useSelector } from "react-redux";
import { InitState, setPreferences, UserPreferences } from "State/Login";
import { DefaultImgProxy, setPreferences, UserPreferences } from "State/Login";
import { RootState } from "State/Store";
import "./Preferences.css";
@ -43,7 +43,7 @@ const PreferencesPage = () => {
<small>Use imgproxy to compress images</small>
</div>
<div>
<input type="checkbox" checked={perf.imgProxyConfig !== null} onChange={e => dispatch(setPreferences({ ...perf, imgProxyConfig: e.target.checked ? InitState.preferences.imgProxyConfig : null }))} />
<input type="checkbox" checked={perf.imgProxyConfig !== null} onChange={e => dispatch(setPreferences({ ...perf, imgProxyConfig: e.target.checked ? DefaultImgProxy : null }))} />
</div>
</div>
{perf.imgProxyConfig && (<div className="w-max mt10 form">

View File

@ -146,7 +146,7 @@ export interface LoginStore {
preferences: UserPreferences
};
const DefaultImgProxy = {
export const DefaultImgProxy = {
url: "https://imgproxy.snort.social",
key: "a82fcf26aa0ccb55dfc6b4bd6a1c90744d3be0f38429f21a8828b43449ce7cebe6bdc2b09a827311bef37b18ce35cb1e6b1c60387a254541afa9e5b4264ae942",
salt: "a897770d9abf163de055e9617891214e75a9016d748f8ef865e6ffbcb9ed932295659549773a22a019a5f06d0b440c320be411e3fddfe784e199e4f03d74bd9b"
@ -176,7 +176,7 @@ export const InitState = {
showDebugMenus: false,
autoShowLatest: false,
fileUploader: "void.cat",
imgProxyConfig: null
imgProxyConfig: DefaultImgProxy
}
} as LoginStore;