mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-19 07:55:25 +02:00
feat: Add enable_image_proxy_storage option to GlobalSettings
This commit is contained in:
parent
21c9acbd2c
commit
7111245c3e
@ -379,6 +379,10 @@
|
||||
},
|
||||
"enableImageProxy": {
|
||||
"label": "Enable image proxy",
|
||||
"description": "If enabled, images will be proxied through the server. This enhances your user's privacy as their ip address will not be leaked."
|
||||
},
|
||||
"enableImageProxyStorage": {
|
||||
"label": "Enable image proxy storage",
|
||||
"description": "If enabled, images will be stored on the server and forwarded to the user. This makes email tracking nearly impossible as every message will be marked as read instantly, which is obviously not true as a user is typically not able to view an email in just a few seconds after it has been sent. This will only affect new images."
|
||||
},
|
||||
"userEmailEnableDisposableEmails": {
|
||||
|
@ -11,6 +11,7 @@ import AliasesPercentageAmount from "./AliasPercentageAmount"
|
||||
|
||||
import {
|
||||
Checkbox,
|
||||
Collapse,
|
||||
FormControlLabel,
|
||||
FormGroup,
|
||||
FormHelperText,
|
||||
@ -82,6 +83,9 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
||||
enableImageProxy: yup
|
||||
.boolean()
|
||||
.label(t("routes.AdminRoute.forms.settings.enableImageProxy.label")),
|
||||
enableImageProxyStorage: yup
|
||||
.boolean()
|
||||
.label(t("routes.AdminRoute.forms.settings.enableImageProxyStorage.label")),
|
||||
allowStatistics: yup
|
||||
.boolean()
|
||||
.label(t("routes.AdminRoute.forms.settings.allowStatistics.label")),
|
||||
@ -465,6 +469,8 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
||||
</FormGroup>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Grid container spacing={1}>
|
||||
<Grid item>
|
||||
<FormGroup key="enable_image_proxy">
|
||||
<FormControlLabel
|
||||
control={
|
||||
@ -493,6 +499,41 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
||||
</FormHelperText>
|
||||
</FormGroup>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<Collapse in={formik.values.enableImageProxy}>
|
||||
<FormGroup key="enable_image_proxy_storage">
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={
|
||||
formik.values.enableImageProxyStorage
|
||||
}
|
||||
onChange={formik.handleChange}
|
||||
name="enableImageProxyStorage"
|
||||
/>
|
||||
}
|
||||
disabled={formik.isSubmitting}
|
||||
label={t(
|
||||
"routes.AdminRoute.forms.settings.enableImageProxyStorage.label",
|
||||
)}
|
||||
/>
|
||||
<FormHelperText
|
||||
error={
|
||||
formik.touched.enableImageProxyStorage &&
|
||||
Boolean(formik.errors.enableImageProxyStorage)
|
||||
}
|
||||
>
|
||||
{(formik.touched.enableImageProxyStorage &&
|
||||
formik.errors.enableImageProxyStorage) ||
|
||||
t(
|
||||
"routes.AdminRoute.forms.settings.enableImageProxyStorage.description",
|
||||
)}
|
||||
</FormHelperText>
|
||||
</FormGroup>
|
||||
</Collapse>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<FormGroup key="allow_statistics">
|
||||
<FormControlLabel
|
||||
|
@ -208,6 +208,7 @@ export interface AdminSettings {
|
||||
customEmailSuffixChars: string
|
||||
imageProxyStorageLifeTimeInHours: number
|
||||
enableImageProxy: boolean
|
||||
enableImageProxyStorage: boolean
|
||||
userEmailEnableDisposableEmails: boolean
|
||||
userEmailEnableOtherRelays: boolean
|
||||
allowStatistics: boolean
|
||||
|
Loading…
x
Reference in New Issue
Block a user