feat: Show hour unit on image proxy storage lifetime field

This commit is contained in:
Myzel394 2023-02-11 19:42:37 +01:00
parent ff18b33aaf
commit ca7cd2be14
2 changed files with 15 additions and 1 deletions

View File

@ -360,7 +360,9 @@
}, },
"imageProxyStorageLifeTimeInHours": { "imageProxyStorageLifeTimeInHours": {
"label": "Image proxy storage lifetime", "label": "Image proxy storage lifetime",
"description": "The lifetime of images that are stored on the server. After this time, the image will be deleted." "description": "The lifetime of images that are stored on the server in hours. After this time, the image will be deleted.",
"unit_one": "hour",
"unit_other": "hours"
}, },
"enableImageProxy": { "enableImageProxy": {
"label": "Enable image proxy", "label": "Enable image proxy",

View File

@ -355,6 +355,18 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
<BsImage /> <BsImage />
</InputAdornment> </InputAdornment>
), ),
endAdornment: (
<InputAdornment position="end">
{t(
"routes.AdminRoute.forms.settings.imageProxyStorageLifeTimeInHours.unit",
{
count:
formik.values
.imageProxyStorageLifeTimeInHours || 0,
},
)}
</InputAdornment>
),
}} }}
/> />
</Grid> </Grid>