From 8d68a4554d72724745292f609bb1fd2cd7422d87 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Tue, 8 Jul 2025 17:31:12 +0200 Subject: [PATCH] refactor: deprecate languages --- .../panel/settings-panel/GeneralSettings.tsx | 44 +++++++++++-------- .../app-settings/quick-start/QuickStart.tsx | 5 --- .../src/translation/TranslationProvider.tsx | 10 ----- apps/client/src/translation/languages/hu.ts | 30 ------------- apps/client/src/translation/languages/no.ts | 30 ------------- apps/client/src/translation/languages/pl.ts | 30 ------------- apps/client/src/translation/languages/pt.ts | 4 +- apps/client/src/translation/languages/sv.ts | 30 ------------- apps/client/src/translation/languages/zh.ts | 30 ------------- 9 files changed, 28 insertions(+), 185 deletions(-) delete mode 100644 apps/client/src/translation/languages/hu.ts delete mode 100644 apps/client/src/translation/languages/no.ts delete mode 100644 apps/client/src/translation/languages/pl.ts delete mode 100644 apps/client/src/translation/languages/sv.ts delete mode 100644 apps/client/src/translation/languages/zh.ts diff --git a/apps/client/src/features/app-settings/panel/settings-panel/GeneralSettings.tsx b/apps/client/src/features/app-settings/panel/settings-panel/GeneralSettings.tsx index 2f2342cd1..40fcba239 100644 --- a/apps/client/src/features/app-settings/panel/settings-panel/GeneralSettings.tsx +++ b/apps/client/src/features/app-settings/panel/settings-panel/GeneralSettings.tsx @@ -1,12 +1,12 @@ import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; -import { Select } from '@chakra-ui/react'; import { Settings } from 'ontime-types'; import { postSettings } from '../../../../common/api/settings'; import { maybeAxiosError } from '../../../../common/api/utils'; import Button from '../../../../common/components/buttons/Button'; import Input from '../../../../common/components/input/input/Input'; +import Select from '../../../../common/components/select/Select'; import useSettings from '../../../../common/hooks-query/useSettings'; import { preventEscape } from '../../../../common/utils/keyEvent'; import { isOnlyNumbers } from '../../../../common/utils/regex'; @@ -22,6 +22,8 @@ export default function GeneralSettings() { register, reset, setError, + watch, + setValue, formState: { isSubmitting, isDirty, isValid, errors }, } = useForm({ mode: 'onChange', @@ -133,10 +135,15 @@ export default function GeneralSettings() { description='Default time format to show in views 12 /24 hours' error={errors.timeFormat?.message} /> - + - - - - - - - - - - - - +