From 034187d1c434b6bee32aeb539ea543f6ec537376 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 3 Jul 2026 16:55:23 -0400 Subject: feat: card ui added to drops, hazards, techs, and mods in admin gui --- internal/admin/static/objecteditor.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'internal/admin/static/objecteditor.js') diff --git a/internal/admin/static/objecteditor.js b/internal/admin/static/objecteditor.js index d45c26e..3cbb37a 100644 --- a/internal/admin/static/objecteditor.js +++ b/internal/admin/static/objecteditor.js @@ -1,6 +1,7 @@ var objectData = null; var objectID = null; var expandedCards = {}; +var cardWidths = {}; var SECTIONS = [ { @@ -220,9 +221,12 @@ function fieldIDSub(sec, subKey, idx, fieldKey) { function renderCard(sec, data) { var collapsed = expandedCards[sec.id] === false; - var h = '
'; + var isFull = cardWidths[sec.id] !== undefined ? cardWidths[sec.id] : (sec.fullWidth || false); + var fullClass = isFull ? ' obj-card-full' : ''; + var h = '
'; h += '
'; h += '' + (collapsed ? '▶' : '▼') + ''; + h += ''; h += '' + sec.label + ''; if (!sec.always) { h += ''; @@ -517,6 +521,11 @@ function toggleCard(id) { renderCurrent(); } +function toggleCardWidth(id) { + cardWidths[id] = !cardWidths[id]; + renderCurrent(); +} + function removeSection(id) { var sec = SECTIONS.find(function(s) { return s.id === id; }); if (!sec) return; -- cgit v1.2.3