mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-01 01:17:13 +00:00
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:
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user