mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-19 15:55:26 +02:00
feat: Add allowAliasDeletion field to admin settings
This commit is contained in:
parent
9a7b868301
commit
28e645abcb
@ -383,6 +383,10 @@
|
|||||||
"allowStatistics": {
|
"allowStatistics": {
|
||||||
"label": "Allow statistics",
|
"label": "Allow statistics",
|
||||||
"description": "If enabled, your instance will collect anonymous statistics and share them. They will only be stored locally on this instance but made public."
|
"description": "If enabled, your instance will collect anonymous statistics and share them. They will only be stored locally on this instance but made public."
|
||||||
|
},
|
||||||
|
"allowAliasDeletion": {
|
||||||
|
"label": "Allow alias deletion",
|
||||||
|
"description": "If enabled, users will be able to delete their aliases."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11,4 +11,5 @@ export const DEFAULT_ADMIN_SETTINGS: AdminSettings = {
|
|||||||
imageProxyStorageLifeTimeInHours: 24,
|
imageProxyStorageLifeTimeInHours: 24,
|
||||||
enableImageProxy: true,
|
enableImageProxy: true,
|
||||||
allowStatistics: true,
|
allowStatistics: true,
|
||||||
|
allowAliasDeletion: false,
|
||||||
}
|
}
|
||||||
|
@ -488,6 +488,35 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
|
|||||||
</FormHelperText>
|
</FormHelperText>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid item>
|
||||||
|
<FormGroup key="allow_alias_deletion">
|
||||||
|
<FormControlLabel
|
||||||
|
control={
|
||||||
|
<Checkbox
|
||||||
|
checked={formik.values.allowAliasDeletion!}
|
||||||
|
onChange={formik.handleChange}
|
||||||
|
name="allowAliasDeletion"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
disabled={formik.isSubmitting}
|
||||||
|
label={t(
|
||||||
|
"routes.AdminRoute.forms.settings.allowAliasDeletion.label",
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormHelperText
|
||||||
|
error={
|
||||||
|
formik.touched.allowAliasDeletion &&
|
||||||
|
Boolean(formik.errors.allowAliasDeletion)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{(formik.touched.allowAliasDeletion &&
|
||||||
|
formik.errors.allowAliasDeletion) ||
|
||||||
|
t(
|
||||||
|
"routes.AdminRoute.forms.settings.allowAliasDeletion.description",
|
||||||
|
)}
|
||||||
|
</FormHelperText>
|
||||||
|
</FormGroup>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
@ -210,4 +210,5 @@ export interface AdminSettings {
|
|||||||
userEmailEnableDisposableEmails: boolean
|
userEmailEnableDisposableEmails: boolean
|
||||||
userEmailEnableOtherRelays: boolean | null
|
userEmailEnableOtherRelays: boolean | null
|
||||||
allowStatistics: boolean | null
|
allowStatistics: boolean | null
|
||||||
|
allowAliasDeletion: boolean | null
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user