Hero: themagebonden Checkbox/Radio in het Hero-scherm en de focusdialoog; zoomschuif met themakleur
Continuous Integration / changes (pull_request) Successful in 13s
Continuous Integration / config-asf (pull_request) Successful in 6s
Continuous Integration / backend-build (pull_request) Skipped
Continuous Integration / compile-sites (pull_request) Skipped
Continuous Integration / backend-test (pull_request) Skipped
Continuous Integration / vulnerability-scan (pull_request) Skipped
Continuous Integration / config-sls (pull_request) Successful in 8s
Continuous Integration / frontend-prepare (pull_request) Successful in 34s
Continuous Integration / frontend-build (pull_request) Successful in 47s
Continuous Integration / frontend-lint (pull_request) Successful in 34s
Continuous Integration / frontend-test (pull_request) Successful in 2m22s
Continuous Integration / publish-sls-test (pull_request) Skipped
Continuous Integration / publish-sls-production (pull_request) Skipped
Continuous Integration / deploy-sls-test (pull_request) Skipped
Continuous Integration / deploy-sls-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / smoke-sls-test (pull_request) Skipped
Continuous Integration / smoke-asf-test (pull_request) Skipped
Continuous Integration / changes (pull_request) Successful in 13s
Continuous Integration / config-asf (pull_request) Successful in 6s
Continuous Integration / backend-build (pull_request) Skipped
Continuous Integration / compile-sites (pull_request) Skipped
Continuous Integration / backend-test (pull_request) Skipped
Continuous Integration / vulnerability-scan (pull_request) Skipped
Continuous Integration / config-sls (pull_request) Successful in 8s
Continuous Integration / frontend-prepare (pull_request) Successful in 34s
Continuous Integration / frontend-build (pull_request) Successful in 47s
Continuous Integration / frontend-lint (pull_request) Successful in 34s
Continuous Integration / frontend-test (pull_request) Successful in 2m22s
Continuous Integration / publish-sls-test (pull_request) Skipped
Continuous Integration / publish-sls-production (pull_request) Skipped
Continuous Integration / deploy-sls-test (pull_request) Skipped
Continuous Integration / deploy-sls-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / smoke-sls-test (pull_request) Skipped
Continuous Integration / smoke-asf-test (pull_request) Skipped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,8 @@ import { useRef, useState, type KeyboardEvent, type PointerEvent } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { CheckboxField } from '@/components/ui/checkbox';
|
||||
import { RadioField } from '@/components/ui/radio';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import { mediaUrl } from '../lib/media';
|
||||
@@ -101,29 +103,24 @@ function FocusEditor({ image, onApply, onClose }: { image: HeroImageDto; onApply
|
||||
<fieldset className="flex flex-wrap gap-4">
|
||||
<legend className="sr-only">{t('hero.focus.targetLegend')}</legend>
|
||||
{(['general', 'wide', 'tall'] as const).map((value) => (
|
||||
<label key={value} className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="radio"
|
||||
name="focus-target"
|
||||
checked={target === value}
|
||||
onChange={() => setTarget(value)}
|
||||
data-testid={`focus-target-${value}`}
|
||||
/>
|
||||
{t(`hero.focus.target.${value}`)}
|
||||
</label>
|
||||
<RadioField
|
||||
key={value}
|
||||
name="focus-target"
|
||||
checked={target === value}
|
||||
onChange={() => setTarget(value)}
|
||||
data-testid={`focus-target-${value}`}
|
||||
label={t(`hero.focus.target.${value}`)}
|
||||
/>
|
||||
))}
|
||||
</fieldset>
|
||||
|
||||
{target !== 'general' && (
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={editable}
|
||||
onChange={(event) => toggleOverride(event.target.checked)}
|
||||
data-testid={`focus-override-${target}`}
|
||||
/>
|
||||
{t('hero.focus.override')}
|
||||
</label>
|
||||
<CheckboxField
|
||||
checked={editable}
|
||||
onChange={(event) => toggleOverride(event.target.checked)}
|
||||
data-testid={`focus-override-${target}`}
|
||||
label={t('hero.focus.override')}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-[2fr_1fr]">
|
||||
@@ -205,7 +202,7 @@ function FocusEditor({ image, onApply, onClose }: { image: HeroImageDto; onApply
|
||||
disabled={!editable}
|
||||
value={active.zoom}
|
||||
onChange={(event) => update({ ...active, zoom: Number(event.target.value) })}
|
||||
className="w-full"
|
||||
className="w-full accent-primary disabled:cursor-not-allowed disabled:opacity-50"
|
||||
data-testid="focus-zoom"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user