mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-19 07:55:25 +02:00
Merge pull request #13 from Myzel394/add-image-proxy-option
feat: Add enable_image_proxy_storage option to GlobalSettings
This commit is contained in:
commit
c72db4f54c
@ -379,6 +379,10 @@
|
|||||||
},
|
},
|
||||||
"enableImageProxy": {
|
"enableImageProxy": {
|
||||||
"label": "Enable image proxy",
|
"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."
|
"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": {
|
"userEmailEnableDisposableEmails": {
|
||||||
|
@ -10,6 +10,7 @@ export const DEFAULT_ADMIN_SETTINGS: AdminSettings = {
|
|||||||
userEmailEnableDisposableEmails: false,
|
userEmailEnableDisposableEmails: false,
|
||||||
imageProxyStorageLifeTimeInHours: 24,
|
imageProxyStorageLifeTimeInHours: 24,
|
||||||
enableImageProxy: true,
|
enableImageProxy: true,
|
||||||
|
enableImageProxyStorage: true,
|
||||||
allowStatistics: true,
|
allowStatistics: true,
|
||||||
allowAliasDeletion: false,
|
allowAliasDeletion: false,
|
||||||
maxAliasesPerUser: 0,
|
maxAliasesPerUser: 0,
|
||||||
|
@ -11,6 +11,7 @@ import AliasesPercentageAmount from "./AliasPercentageAmount"
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Checkbox,
|
Checkbox,
|
||||||
|
Collapse,
|
||||||
FormControlLabel,
|
FormControlLabel,
|
||||||
FormGroup,
|
FormGroup,
|
||||||
FormHelperText,
|
FormHelperText,
|
||||||
@ -82,6 +83,9 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
|||||||
enableImageProxy: yup
|
enableImageProxy: yup
|
||||||
.boolean()
|
.boolean()
|
||||||
.label(t("routes.AdminRoute.forms.settings.enableImageProxy.label")),
|
.label(t("routes.AdminRoute.forms.settings.enableImageProxy.label")),
|
||||||
|
enableImageProxyStorage: yup
|
||||||
|
.boolean()
|
||||||
|
.label(t("routes.AdminRoute.forms.settings.enableImageProxyStorage.label")),
|
||||||
allowStatistics: yup
|
allowStatistics: yup
|
||||||
.boolean()
|
.boolean()
|
||||||
.label(t("routes.AdminRoute.forms.settings.allowStatistics.label")),
|
.label(t("routes.AdminRoute.forms.settings.allowStatistics.label")),
|
||||||
@ -465,6 +469,8 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
|
<Grid container spacing={1}>
|
||||||
|
<Grid item>
|
||||||
<FormGroup key="enable_image_proxy">
|
<FormGroup key="enable_image_proxy">
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={
|
control={
|
||||||
@ -493,6 +499,41 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
|||||||
</FormHelperText>
|
</FormHelperText>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Grid>
|
</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}>
|
<Grid item xs={12}>
|
||||||
<FormGroup key="allow_statistics">
|
<FormGroup key="allow_statistics">
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
|
@ -208,6 +208,7 @@ export interface AdminSettings {
|
|||||||
customEmailSuffixChars: string
|
customEmailSuffixChars: string
|
||||||
imageProxyStorageLifeTimeInHours: number
|
imageProxyStorageLifeTimeInHours: number
|
||||||
enableImageProxy: boolean
|
enableImageProxy: boolean
|
||||||
|
enableImageProxyStorage: boolean
|
||||||
userEmailEnableDisposableEmails: boolean
|
userEmailEnableDisposableEmails: boolean
|
||||||
userEmailEnableOtherRelays: boolean
|
userEmailEnableOtherRelays: boolean
|
||||||
allowStatistics: boolean
|
allowStatistics: boolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user