feat(dashboard): a 3D button beside every property link

fmt.property(id, name) links a property's page and adds a small 3D button
straight to its 3D view. Used everywhere a property is linked: the
properties list and top slots, moderation, character pages' related
properties, UGC search and the UGC page's placements, the home page, the
chat log, player reports and report notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-28 19:09:29 -05:00
parent 93f4b051c6
commit 3c004fd36d
10 changed files with 16 additions and 10 deletions

View File

@@ -145,6 +145,12 @@
},
badge: function (text, type) { return '<span class="badge text-bg-' + type + '">' + esc(text) + '</span>'; },
link: function (href, text) { return '<a href="' + esc(href) + '">' + esc(text) + '</a>'; },
// A property by name, linked to its page, with a button straight to its 3D view
property: function (id, name) {
if (!id || id === '0') return '<span class="text-body-secondary">-</span>';
return '<span class="text-nowrap">' + fmt.link('/properties/' + id, name || '(unnamed)') +
' <a href="/properties/' + esc(id) + '/3d" class="btn btn-outline-secondary btn-sm py-0 px-1 ms-1 align-baseline" title="Open the 3D view">3D</a></span>';
},
// A character by name, linked; the ID only when the name is unknown (e.g. a deleted character)
character: function (id, name) {
if (!id || id === '0') return '<span class="text-body-secondary">-</span>';