fix: clarify popup text and form fields in import UI - fix Italian copy in nitro editor, use shared CloneSource interface, make nitro/icon fields optional
CI / check (push) Successful in 31s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m3s

This commit is contained in:
openhands committed 2026-08-06 20:44:34 +02:00
1 parent f792c276b7
commit 94ccd098d5
2 files changed
+15 -16

No files matched your search

@@ -28,20 +28,12 @@ import {
} from "@/components/ui/select";
import { adminFetch } from "@/lib/admin-fetch";
import { HABBO_GAMEDATA_HOTELS } from "@/lib/habbo-gamedata-hotel";
import type { CloneSource } from "@/lib/services/clone-sources";
import { runSseImport } from "@/lib/sse-client";
import { cn } from "@/lib/utils";
// ── Types ─────────────────────────────────────────────────────────────────────
interface CloneSource {
id: string;
name: string;
furnidataUrl: string;
nitroBaseUrl: string;
iconBaseUrl: string;
hotel: string;
}
interface FurniItem {
classname: string;
name: string;
@@ -80,6 +72,9 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
const [furnidataUrl, setFurnidataUrl] = useState(initial?.furnidataUrl ?? "");
const [nitroBaseUrl, setNitroBaseUrl] = useState(initial?.nitroBaseUrl ?? "");
const [iconBaseUrl, setIconBaseUrl] = useState(initial?.iconBaseUrl ?? "");
const [sourceSwfBaseUrl, setSourceSwfBaseUrl] = useState(
initial?.sourceSwfBaseUrl ?? "",
);
const [hotel, setHotel] = useState(initial?.hotel ?? "");
async function handleSubmit(e: React.FormEvent) {
@@ -90,6 +85,7 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
furnidataUrl,
nitroBaseUrl,
iconBaseUrl,
sourceSwfBaseUrl,
hotel,
});
}
@@ -119,13 +115,16 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
placeholder="Nitro base URL (e.g. https://x/bundled/furniture)"
value={nitroBaseUrl}
onChange={(e) => setNitroBaseUrl(e.target.value)}
required
/>
<Input
placeholder="Icon base URL (e.g. https://x/icons)"
value={iconBaseUrl}
onChange={(e) => setIconBaseUrl(e.target.value)}
required
/>
<Input
placeholder="SWF base URL (optional, for non-Habbo sources)"
value={sourceSwfBaseUrl}
onChange={(e) => setSourceSwfBaseUrl(e.target.value)}
/>
<Select value={hotel} onValueChange={setHotel}>
<SelectTrigger>
@@ -339,7 +339,7 @@ export function NitroEditorDialog({
{colorCount > 0 && (
<Badge variant="outline" className="text-[10px] gap-1">
<Palette className="w-2.5 h-2.5" />
{colorCount} colori
{colorCount} colors
</Badge>
)}
{animCount > 0 && (
@@ -491,7 +491,7 @@ export function NitroEditorDialog({
<Compass className="w-4 h-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Directions</h3>
<span className="text-xs text-muted-foreground ml-auto">
{directions.length} attive
{directions.length} active
</span>
</div>
<div className="flex items-center justify-center">
@@ -541,7 +541,7 @@ export function NitroEditorDialog({
<section className="rounded-lg border bg-card p-4">
<div className="flex items-center gap-2 mb-3">
<Eye className="w-4 h-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Tipo</h3>
<h3 className="text-sm font-medium">Types</h3>
</div>
<div className="grid grid-cols-2 gap-3">
<div>
@@ -663,7 +663,7 @@ export function NitroEditorDialog({
<Palette className="w-4 h-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Colori</h3>
<Badge variant="secondary" className="text-[10px] ml-auto">
{colorCount} varianti
{colorCount} colors
</Badge>
</div>
<div className="space-y-3">
@@ -672,7 +672,7 @@ export function NitroEditorDialog({
<div key={colorId} className="rounded-md border p-3">
<div className="flex items-center gap-2 mb-2">
<span className="text-xs font-medium">
Variante #{colorId}
Color Variant #{colorId}
</span>
{/* Color preview dots */}
<div className="flex gap-1 ml-auto">