@@ -140,13 +145,18 @@ const DaySchedule: React.FC = ({
- 0 ? 'bg-blue-50' : 'bg-orange-50'}`}
+
+ 0 ? 'bg-blue-50' : 'bg-orange-50'}`}
+ >
+ {totalMgDiff > 0 ? : }
+ {day.doses.reduce((sum, dose) => sum + (parseFloat(dose.ldx) || 0), 0).toFixed(1)} mg
+
+
diff --git a/src/components/language-selector.tsx b/src/components/language-selector.tsx
index 132996c..0289fdd 100644
--- a/src/components/language-selector.tsx
+++ b/src/components/language-selector.tsx
@@ -14,15 +14,15 @@ import { Label } from './ui/label';
const LanguageSelector = ({ currentLanguage, onLanguageChange, t }: any) => {
return (
-
-
+
+
diff --git a/src/components/settings.tsx b/src/components/settings.tsx
index 140ccb5..4f5330e 100644
--- a/src/components/settings.tsx
+++ b/src/components/settings.tsx
@@ -18,7 +18,7 @@ import { Label } from './ui/label';
import { Separator } from './ui/separator';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui/tooltip';
-import { ChevronDown, ChevronUp } from 'lucide-react';
+import { ChevronDown, ChevronUp, Info } from 'lucide-react';
import { getDefaultState } from '../constants/defaults';
/**
@@ -173,12 +173,19 @@ const Settings = ({
checked={showTemplateDay}
onCheckedChange={checked => onUpdateUiSetting('showTemplateDay', checked)}
/>
+
-
+
{tWithDefaults(t, 'showTemplateDayTooltip', defaultsForT)}
@@ -195,12 +202,19 @@ const Settings = ({
checked={showDayReferenceLines}
onCheckedChange={checked => onUpdateUiSetting('showDayReferenceLines', checked)}
/>
+
-
+
{tWithDefaults(t, 'showDayReferenceLinesTooltip', defaultsForT)}
@@ -217,12 +231,19 @@ const Settings = ({
checked={showTherapeuticRange}
onCheckedChange={checked => onUpdateUiSetting('showTherapeuticRange', checked)}
/>
+
-
+
{tWithDefaults(t, 'showTherapeuticRangeLinesTooltip', defaultsForT)}
@@ -232,19 +253,28 @@ const Settings = ({
{showTherapeuticRange && (
-
-
-
-
-
-
- {tWithDefaults(t, 'therapeuticRangeTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'therapeuticRangeTooltip', defaultsForT)}
+
+
+
+
+
onUpdateTherapeuticRange('min', val)}
@@ -273,16 +303,25 @@ const Settings = ({
-
-
-
-
-
-
- {tWithDefaults(t, 'displayedDaysTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'displayedDaysTooltip', defaultsForT)}
+
+
+
+
onUpdateUiSetting('displayedDays', val)}
@@ -296,17 +335,26 @@ const Settings = ({
-
-
-
-
-
-
- {tWithDefaults(t, 'yAxisRangeTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'yAxisRangeTooltip', defaultsForT)}
+
+
+
+
+
onUpdateUiSetting('yAxisMin', val)}
@@ -392,16 +440,25 @@ const Settings = ({
{isSimulationExpanded && (
-
-
-
-
-
-
- {tWithDefaults(t, 'simulationDurationTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'simulationDurationTooltip', defaultsForT)}
+
+
+
+
onUpdateUiSetting('simulationDays', val)}
@@ -415,16 +472,25 @@ const Settings = ({
-
-
-
-
-
-
- {tWithDefaults(t, 'steadyStateDaysTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'steadyStateDaysTooltip', defaultsForT)}
+
+
+
+
updateAdvancedDirect('steadyStateDays', val)}
@@ -451,16 +517,25 @@ const Settings = ({
{t('dAmphetamineParameters')}
-
-
-
-
-
-
- {renderTooltipWithLinks(tWithDefaults(t, 'halfLifeTooltip', defaultsForT))}
-
-
-
+
+
+
+
+
+
+
+
+ {renderTooltipWithLinks(tWithDefaults(t, 'halfLifeTooltip', defaultsForT))}
+
+
+
+
onUpdatePkParams('damph', { ...pkParams.damph, halfLife: val })}
@@ -480,16 +555,25 @@ const Settings = ({
{t('lisdexamfetamineParameters')}
-
-
-
-
-
-
- {tWithDefaults(t, 'conversionHalfLifeTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'conversionHalfLifeTooltip', defaultsForT)}
+
+
+
+
onUpdatePkParams('ldx', { ...pkParams.ldx, halfLife: val })}
@@ -505,16 +589,25 @@ const Settings = ({
-
-
-
-
-
-
- {tWithDefaults(t, 'absorptionHalfLifeTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'absorptionHalfLifeTooltip', defaultsForT)}
+
+
+
+
onUpdatePkParams('ldx', { ...pkParams.ldx, absorptionHalfLife: val })}
@@ -554,12 +647,19 @@ const Settings = ({
checked={pkParams.advanced.weightBasedVd.enabled}
onCheckedChange={checked => updateAdvanced('weightBasedVd', 'enabled', checked)}
/>
+
-
+
{tWithDefaults(t, 'weightBasedVdTooltip', defaultsForT)}
@@ -569,16 +669,25 @@ const Settings = ({
{pkParams.advanced.weightBasedVd.enabled && (
-
-
-
-
-
-
- {renderTooltipWithLinks(tWithDefaults(t, 'bodyWeightTooltip', defaultsForT))}
-
-
-
+
+
+
+
+
+
+
+
+ {renderTooltipWithLinks(tWithDefaults(t, 'bodyWeightTooltip', defaultsForT))}
+
+
+
+
updateAdvanced('weightBasedVd', 'bodyWeight', val)}
@@ -602,12 +711,19 @@ const Settings = ({
checked={pkParams.advanced.foodEffect.enabled}
onCheckedChange={checked => updateAdvanced('foodEffect', 'enabled', checked)}
/>
+
-
+
{tWithDefaults(t, 'foodEffectTooltip', defaultsForT)}
@@ -617,16 +733,25 @@ const Settings = ({
{pkParams.advanced.foodEffect.enabled && (
-
-
-
-
-
-
- {renderTooltipWithLinks(tWithDefaults(t, 'tmaxDelayTooltip', defaultsForT))}
-
-
-
+
+
+
+
+
+
+
+
+ {renderTooltipWithLinks(tWithDefaults(t, 'tmaxDelayTooltip', defaultsForT))}
+
+
+
+
updateAdvanced('foodEffect', 'tmaxDelay', val)}
@@ -650,12 +775,19 @@ const Settings = ({
checked={pkParams.advanced.urinePh.enabled}
onCheckedChange={checked => updateAdvanced('urinePh', 'enabled', checked)}
/>
+
-
+
{tWithDefaults(t, 'urinePHTooltip', defaultsForT)}
@@ -665,25 +797,34 @@ const Settings = ({
{pkParams.advanced.urinePh.enabled && (
-
-
-
-
-
-
- {tWithDefaults(t, 'urinePHValueTooltip', defaultsForT)}
-
-
-
+
+
+
+
+
+
+
+
+ {tWithDefaults(t, 'urinePHValueTooltip', defaultsForT)}
+
+
+
+
updateAdvanced('urinePh', 'phTendency', val)}
increment={0.1}
min={5.5}
max={8.0}
+ unit={t('phUnit')}
required={true}
/>
- {t('phUnit')}
)}
@@ -692,16 +833,25 @@ const Settings = ({
{/* Oral Bioavailability */}
-
-
-
-
-
-
- {renderTooltipWithLinks(tWithDefaults(t, 'oralBioavailabilityTooltip', defaultsForT))}
-
-
-
+
+
+
+
+
+
+
+
+ {renderTooltipWithLinks(tWithDefaults(t, 'oralBioavailabilityTooltip', defaultsForT))}
+
+
+
+
updateAdvancedDirect('fOral', val)}
diff --git a/src/locales/de.ts b/src/locales/de.ts
index 2c30568..602ae8d 100644
--- a/src/locales/de.ts
+++ b/src/locales/de.ts
@@ -10,9 +10,9 @@ export const de = {
both: "Beide",
// Language selector
- language: "Sprache",
- english: "English",
- german: "Deutsch",
+ languageSelectorLabel: "Sprache",
+ languageSelectorEN: "English",
+ languageSelectorDE: "Deutsch",
// Dose Schedule
myPlan: "Mein Plan",
diff --git a/src/locales/en.ts b/src/locales/en.ts
index e53e989..689a8a6 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -10,9 +10,9 @@ export const en = {
both: "Both",
// Language selector
- language: "Language",
- english: "English",
- german: "Deutsch",
+ languageSelectorLabel: "Language",
+ languageSelectorEN: "English",
+ languageSelectorDE: "Deutsch",
// Dose Schedule
myPlan: "My Plan",