From ca7cd2be14a8193d12ef108dcbe78ee15908826b Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sat, 11 Feb 2023 19:42:37 +0100 Subject: [PATCH] feat: Show hour unit on image proxy storage lifetime field --- public/locales/en-US/translation.json | 4 +++- .../GlobalSettingsRoute/SettingsForm.tsx | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/public/locales/en-US/translation.json b/public/locales/en-US/translation.json index 141d829..3a98730 100644 --- a/public/locales/en-US/translation.json +++ b/public/locales/en-US/translation.json @@ -360,7 +360,9 @@ }, "imageProxyStorageLifeTimeInHours": { "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": { "label": "Enable image proxy", diff --git a/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx b/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx index af5c423..44a9d70 100644 --- a/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx +++ b/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx @@ -355,6 +355,18 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) { ), + endAdornment: ( + + {t( + "routes.AdminRoute.forms.settings.imageProxyStorageLifeTimeInHours.unit", + { + count: + formik.values + .imageProxyStorageLifeTimeInHours || 0, + }, + )} + + ), }} />