From 2ba0f5ea6f756a6ded570a6e782c2c6f2ac340d2 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sat, 6 Jun 2026 13:32:00 +0200 Subject: [PATCH] =?UTF-8?q?style(furni-editor):=20modern/sleek=20redesign?= =?UTF-8?q?=20=E2=80=94=20slate=20canvas,=20flat=20rounded-xl=20cards,=20c?= =?UTF-8?q?lean=20header,=20toggle-chip=20permissions,=20teal=20as=20restr?= =?UTF-8?q?ained=20accent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/FurniEditorEditView.tsx | 89 ++++++++++--------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/src/components/furni-editor/views/FurniEditorEditView.tsx b/src/components/furni-editor/views/FurniEditorEditView.tsx index f9ac1bb..b4b841b 100644 --- a/src/components/furni-editor/views/FurniEditorEditView.tsx +++ b/src/components/furni-editor/views/FurniEditorEditView.tsx @@ -35,16 +35,16 @@ const Section: FC = ({ title, children, defaultOpen = true }) => const [ open, setOpen ] = useState(defaultOpen); return ( -
+
- { open &&
{ children }
} + { open &&
{ children }
}
); }; @@ -215,40 +215,39 @@ export const FurniEditorEditView: FC = props => }, []); const inputClass = (field?: string) => - `w-full px-2 py-1 text-sm leading-normal rounded-sm border border-[#bbb] focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/40 min-h-[calc(1.5em+0.5rem+2px)]${ field && validation[field] ? ' border-red-500 bg-red-50' : '' }`; - const labelClass = 'text-[11px] font-bold text-[#374151] mb-0.5 flex items-center gap-0.5'; - const readonlyClass = 'w-full px-2 py-1 text-sm font-mono rounded-sm border border-[#ddd] bg-[#f2f2eb] text-[#555] select-all'; + `w-full px-3 py-1.5 text-sm leading-normal rounded-lg border border-slate-300 bg-white focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/15 transition${ field && validation[field] ? ' border-red-400 bg-red-50' : '' }`; + const labelClass = 'text-[11px] font-medium text-slate-500 mb-1 flex items-center gap-0.5'; + const readonlyClass = 'w-full px-3 py-1.5 text-sm font-mono rounded-lg border border-slate-200 bg-slate-50 text-slate-500 select-all'; return ( - - { /* Hero header */ } -
- -
- -
- - { furniName || form.publicName || form.itemName } - { form.itemName } - - ID { item.id } - SPRITE { item.spriteId } - { item.usageCount } IN USE - { isDirty && UNSAVED } - + + { /* Header */ } + +
+ +
+ + { furniName || form.publicName || form.itemName } + { form.itemName } + + ID { item.id } + Sprite { item.spriteId } + { item.usageCount } in use + { isDirty && Unsaved } - -
+ + { /* Primary edit surface: furnidata display name + description (server-authoritative, live) */ } -
-
- Display Name & DescriptionLIVE +
+
+ Display name & description + LIVE { (furniName !== String(furniDataEntry?.name ?? '') || furniDescription !== String(furniDataEntry?.description ?? '')) && - Unsaved } + Unsaved }
-
+
@@ -311,19 +310,21 @@ export const FurniEditorEditView: FC = props =>
{ PERM_GROUPS.map(group => (
- { group.label } -
- { group.keys.map(key => ( - - )) } + { group.label } +
+ { group.keys.map(key => { + const on = (form as any)[key]; + return ( + + ); + }) }
)) }