mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
fix(ui): replace native date pickers and tokenize caution colors
Swap the remaining native date inputs (allergy onset, environment travel/backfill ranges, inbound-document dates) for the app DateField so they no longer render in the browser's locale order. Route the medication caution amber and the document info banner through the warning/info tokens so they adapt to the theme.
This commit is contained in:
1 parent
2afe32492b
commit
c9f8eb9423
10 files changed
+30
-41
No files matched your search
@@ -23,6 +23,7 @@ import { CloudSun, MapPin, Plane, Trash2 } from "lucide-react";
|
||||
import { SettingsCard } from "@/components/settings/settings-card";
|
||||
import { SettingsCardHeader } from "@/components/settings/_card-header";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { DateField } from "@/components/ui/date-field";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
@@ -410,22 +411,20 @@ export function EnvironmentSection() {
|
||||
<Label htmlFor="env-travel-start">
|
||||
{t("settings.sections.environment.startDate")}
|
||||
</Label>
|
||||
<Input
|
||||
<DateField
|
||||
id="env-travel-start"
|
||||
type="date"
|
||||
value={travelStart}
|
||||
onChange={(e) => setTravelStart(e.target.value)}
|
||||
onChange={setTravelStart}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="env-travel-end">
|
||||
{t("settings.sections.environment.endDate")}
|
||||
</Label>
|
||||
<Input
|
||||
<DateField
|
||||
id="env-travel-end"
|
||||
type="date"
|
||||
value={travelEnd}
|
||||
onChange={(e) => setTravelEnd(e.target.value)}
|
||||
onChange={setTravelEnd}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
@@ -457,22 +456,20 @@ export function EnvironmentSection() {
|
||||
<Label htmlFor="env-backfill-start">
|
||||
{t("settings.sections.environment.startDate")}
|
||||
</Label>
|
||||
<Input
|
||||
<DateField
|
||||
id="env-backfill-start"
|
||||
type="date"
|
||||
value={effectiveBackfillStart}
|
||||
onChange={(e) => setBackfillStart(e.target.value)}
|
||||
onChange={setBackfillStart}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="env-backfill-end">
|
||||
{t("settings.sections.environment.endDate")}
|
||||
</Label>
|
||||
<Input
|
||||
<DateField
|
||||
id="env-backfill-end"
|
||||
type="date"
|
||||
value={backfillEnd}
|
||||
onChange={(e) => setBackfillEnd(e.target.value)}
|
||||
onChange={setBackfillEnd}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
|
||||
@@ -530,7 +530,7 @@ function FullBackupCard() {
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("settings.sections.export.cards.fullBackup.passphraseHelp")}
|
||||
</p>
|
||||
<p className="text-xs text-amber-600 dark:text-amber-500">
|
||||
<p className="text-warning text-xs">
|
||||
{t("settings.sections.export.cards.fullBackup.noRecoveryWarning")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -201,7 +201,7 @@ export function FitbitCard({
|
||||
<Badge
|
||||
variant="outline"
|
||||
data-testid="fitbit-experimental-badge"
|
||||
className="border-amber-500/50 text-amber-600 dark:text-amber-400"
|
||||
className="border-warning/50 text-warning"
|
||||
>
|
||||
{t("settings.fitbitExperimentalBadge")}
|
||||
</Badge>
|
||||
|
||||
Reference in new issue
Block a user