Update numeric input increment value and enhance localization strings
This commit is contained in:
@@ -140,7 +140,7 @@ const Settings = ({
|
||||
<FormNumericInput
|
||||
value={yAxisMin}
|
||||
onChange={val => onUpdateUiSetting('yAxisMin', val)}
|
||||
increment={5}
|
||||
increment={1}
|
||||
min={0}
|
||||
placeholder={t('auto')}
|
||||
allowEmpty={true}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { Minus, Plus, X } from "lucide-react"
|
||||
import { Button } from "./button"
|
||||
import { Input } from "./input"
|
||||
import { cn } from "../../lib/utils"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
interface NumericInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
|
||||
value: string | number
|
||||
@@ -50,6 +51,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
|
||||
className,
|
||||
...props
|
||||
}, ref) => {
|
||||
const { t } = useTranslation()
|
||||
const [, setShowError] = React.useState(false)
|
||||
const [, setShowWarning] = React.useState(false)
|
||||
const [touched, setTouched] = React.useState(false)
|
||||
@@ -220,6 +222,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
|
||||
)}
|
||||
onClick={() => onChange('')}
|
||||
tabIndex={-1}
|
||||
title={ t('buttonClear') }
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
@@ -62,8 +62,8 @@ export const de = {
|
||||
xAxisFormat24hDesc: "Wiederholender 0-24h Zyklus",
|
||||
xAxisFormat12h: "Tageszeit (12h AM/PM)",
|
||||
xAxisFormat12hDesc: "Wiederholend 12h Zyklus im AM/PM Format",
|
||||
showTemplateDayInChart: "Regulären Plan in abweichenden Tagen zusätzlich einblenden",
|
||||
showDayReferenceLines: "Tagestrenner anzeigen",
|
||||
showTemplateDayInChart: "Regulären Plan einblenden (nur bei abweichenden Tagen)",
|
||||
showDayReferenceLines: "Tagestrenner anzeigen (Referenzlinien und Status)",
|
||||
simulationDuration: "Simulationsdauer",
|
||||
displayedDays: "Sichtbare Tage (im Fokus)",
|
||||
yAxisRange: "Y-Achsen-Bereich (Zoom)",
|
||||
@@ -92,6 +92,9 @@ export const de = {
|
||||
importantNote: "Wichtiger Hinweis",
|
||||
disclaimer: "Dieses Tool dient ausschließlich zu Illustrations- und Informationszwecken. Es ist kein medizinisches Gerät und ersetzt nicht die Beratung durch einen Arzt oder Apotheker. Alle Berechnungen sind Simulationen, die auf allgemeinen pharmakokinetischen Modellen basieren und von individuellen Faktoren erheblich abweichen können. Bitte konsultiere deinen behandelnden Arzt, bevor du Anpassungen an deiner Medikation vornimmst.",
|
||||
|
||||
// Number input field
|
||||
buttonClear: "Feld löschen",
|
||||
|
||||
// Field validation
|
||||
errorNumberRequired: "Bitte gib eine gültige Zahl ein.",
|
||||
errorTimeRequired: "Bitte gib eine gültige Zeitangabe ein.",
|
||||
|
||||
@@ -61,8 +61,8 @@ export const en = {
|
||||
xAxisFormat24hDesc: "Repeating 0-24h cycle",
|
||||
xAxisFormat12h: "Time of Day (12h AM/PM)",
|
||||
xAxisFormat12hDesc: "Repeating 12h cycle in AM/PM format",
|
||||
showTemplateDayInChart: "Overlay regular plan for deviating days",
|
||||
showDayReferenceLines: "Show day separators",
|
||||
showTemplateDayInChart: "Show Regular Plan (Only for Deviating Days)",
|
||||
showDayReferenceLines: "Show Day Separators (Reference Lines and Status)",
|
||||
simulationDuration: "Simulation Duration",
|
||||
displayedDays: "Visible Days (in Focus)",
|
||||
yAxisRange: "Y-Axis Range (Zoom)",
|
||||
@@ -91,6 +91,9 @@ export const en = {
|
||||
importantNote: "Important Notice",
|
||||
disclaimer: "This tool is for illustration and information purposes only. It is not a medical device and does not replace consultation with a doctor or pharmacist. All calculations are simulations based on general pharmacokinetic models and may differ significantly from individual factors. Please consult your treating physician before making adjustments to your medication.",
|
||||
|
||||
// Number input field
|
||||
buttonClear: "Clear field",
|
||||
|
||||
// Field validation
|
||||
errorNumberRequired: "Please enter a valid number.",
|
||||
errorTimeRequired: "Please enter a valid time.",
|
||||
|
||||
Reference in New Issue
Block a user