chore(workspace): move the app to apps/app under a pnpm workspace (step 2)
144 files moved with git mv (pure renames). Root package.json delegates dev/typecheck/test:run/lint/build to the packages; Node 24 LTS and pnpm 10.13.1 pinned (.nvmrc, .node-version, engines, packageManager, root devDependency, engine-strict). Dockerfile builds @faunosteo/app on node:24-alpine and copies apps/app/dist; nginx and runtime config unchanged. CI workflow for Gitea Actions. packages/ reserved (README only). Docs synced: WORKSPACE.md, CLAUDE.md, README, DEPLOY, CHANGELOG, plan. 271/271 tests, typecheck, lint, build green from the root.
This commit is contained in:
1 parent
c8d48ab4cc
commit
8673475293
164 files changed
+348
-128
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import type { Severity } from '@/domain/schema/observation'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
export interface SeveritySelectorProps {
|
||||
value: Severity | undefined
|
||||
onChange: (s: Severity | undefined) => void
|
||||
}
|
||||
|
||||
const SEVERITIES: Severity[] = ['légère', 'modérée', 'sévère']
|
||||
const COLORS: Record<Severity, string> = {
|
||||
'légère': 'border-[var(--severity-mild)] text-[var(--severity-mild)]',
|
||||
'modérée': 'border-[var(--severity-moderate)] text-[var(--severity-moderate)]',
|
||||
'sévère': 'border-[var(--severity-severe)] text-[var(--severity-severe)]',
|
||||
}
|
||||
|
||||
export default function SeveritySelector({ value, onChange }: SeveritySelectorProps) {
|
||||
const t = useT()
|
||||
return (
|
||||
<div role="radiogroup" aria-label={t('severity.aria')} className="flex gap-2">
|
||||
{SEVERITIES.map((s) => (
|
||||
<button
|
||||
key={s}
|
||||
role="radio"
|
||||
aria-checked={value === s}
|
||||
onClick={() => onChange(value === s ? undefined : s)}
|
||||
className={[
|
||||
'rounded-full border px-3 py-1.5 text-sm font-medium capitalize',
|
||||
value === s
|
||||
? `bg-white ${COLORS[s]}`
|
||||
: 'border-[var(--color-border)] text-[var(--color-ink-muted)]',
|
||||
].join(' ')}
|
||||
>
|
||||
{t(`severity.${s}`)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user