Replace native selects with NovaSelect

This commit is contained in:
2026-05-01 07:45:37 +02:00
parent 67be537c86
commit 35011001ba
55 changed files with 3136 additions and 1662 deletions

View File

@@ -791,6 +791,7 @@ export default function StudioArtworkEdit() {
.map((world) => ({
world_id: Number(world.id),
note: typeof world.note === 'string' ? world.note : '',
source_surface: 'navigation',
}))
.filter((entry) => Number.isFinite(entry.world_id) && entry.world_id > 0),
evolution_target_artwork_id: evolutionTarget?.id || null,
@@ -2166,18 +2167,14 @@ export default function StudioArtworkEdit() {
<div className="space-y-4">
<label className="block">
<span className="text-xs font-semibold uppercase tracking-[0.18em] text-slate-400">Story type</span>
<select
<NovaSelect
value={evolutionRelationType}
onChange={(event) => setEvolutionRelationType(event.target.value)}
onChange={(value) => setEvolutionRelationType(value)}
disabled={saving || !evolutionTarget}
className="mt-2 w-full rounded-2xl border border-white/10 bg-[#0d1726] px-4 py-3 text-sm text-white outline-none transition focus:border-sky-300/35 disabled:cursor-not-allowed disabled:opacity-60"
>
{evolutionRelationTypes.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
className="mt-2"
options={evolutionRelationTypes.map((option) => ({ value: option.value, label: option.label }))}
searchable={false}
/>
</label>
{errors.evolution_relation_type?.[0] ? <p className="text-sm text-red-400">{errors.evolution_relation_type[0]}</p> : null}
@@ -2474,6 +2471,7 @@ export default function StudioArtworkEdit() {
onNoteChange={(worldId, note) => setWorldSubmissionOptions((current) => current.map((world) => (
Number(world.id) === Number(worldId) ? { ...world, note } : world
)))}
analyticsContext={{ sourceSurface: 'navigation', sourceDetail: 'studio_artwork_edit' }}
/>
)}