fix(ui): tidy the new record and settings surfaces at phone width

- Composition amounts show only the decimals they carry, so 100 µg no
  longer reads as 100.000 µg; the remove button stays on the amount row.
- AUDIT-C remove controls are icon-only, so they no longer spill out of
  the card or cover the earlier answer.
- Life-circumstance labels keep their colon when they wrap, checkbox
  groups sit in two columns and the weekly-minutes sentence ends.
- Link chips get a 44 px hit area for their remove control.
- The AI usage level reports a failed save with a sentence and the
  error id instead of a bare "Error".
- The Dawarich home-country and admin refresh-gap labels sit above
  their fields.
This commit is contained in:
Marc-André Bombeck committed 2026-10-16 08:03:29 +02:00
1 parent a806676a71
commit 69e2f18788
14 files changed
+50 -34

No files matched your search

+4 -6
View File
@@ -26,6 +26,7 @@ import { SettingsCardActions } from "@/components/settings/_card-actions";
import { SettingsCardHeader } from "@/components/settings/_card-header";
import { useAiProviderState, useAiUsage } from "@/hooks/use-ai-capability";
import { apiPut } from "@/lib/api/api-fetch";
import { showErrorToast } from "@/lib/errors/error-toast";
import type { AiUsageLevel, AiUsageState } from "@/lib/ai/usage-level";
import { useTranslations } from "@/lib/i18n/context";
import { aiInputDependentKeys, invalidateKeys } from "@/lib/query-keys";
@@ -59,6 +60,9 @@ export function AiUsageCard() {
onSuccess: () => {
void invalidateKeys(queryClient, aiInputDependentKeys);
},
// The toast carries the error id a 5xx needs for a support report.
onError: (error) =>
showErrorToast(t("settings.ai.usage.saveError"), { cause: error }),
});
// An older server publishes no level: there is nothing to set.
@@ -215,12 +219,6 @@ export function AiUsageCard() {
</p>
) : null}
{save.isError ? (
<p role="alert" className="text-destructive text-xs">
{t("settings.ai.errorGeneric")}
</p>
) : null}
{usage.preference !== null ? (
<SettingsCardActions>
<Button
@@ -319,7 +319,7 @@ function DawarichHome() {
</div>
) : null}
<div className="space-y-1.5">
<Label htmlFor="dawarich-home-country">
<Label htmlFor="dawarich-home-country" className="flex">
{t("settings.dawarichHomeCountry")}
</Label>
<Input