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

@@ -235,7 +235,7 @@ $(function () {
{ data: 'instanceID', render: function (d, t, row) { return row.properties ? esc(row.properties) + ' propert' + (row.properties === 1 ? 'y' : 'ies') : esc(d); } }
].concat(detailedWorlds ? [{ data: 'cloneID' }, { data: 'propertyName', defaultContent: '', render: function (d, t, row) {
if (!row.cloneID) return '<span class="text-body-secondary">-</span>';
return (row.propertyId ? fmt.link('/properties/' + row.propertyId, d || '(unnamed)') : esc(d || '')) + (row.ownerId ? '<div class="small">by ' + fmt.character(row.ownerId, row.ownerName) + '</div>' : '');
return (row.propertyId ? fmt.property(row.propertyId, d) : esc(d || '')) + (row.ownerId ? '<div class="small">by ' + fmt.character(row.ownerId, row.ownerName) + '</div>' : '');
} }] : []).concat([
{ data: 'players', render: function (d) { return fmt.badge(d, 'primary'); } }
]).concat(detailedWorlds ? [{ data: 'isPrivate', render: function (d) { return d ? fmt.badge('Private', 'warning') : fmt.badge('Public', 'success'); } }, { data: 'port', defaultContent: '', render: function (d, t, row) { return '<code class="small">' + esc((row.ip || '') + ':' + d) + '</code>'; } }] : []).concat(DASH.can('worlds_manage') ? [{ data: null, orderable: false, className: 'text-end', render: function (d, t, row) {

View File

@@ -88,7 +88,7 @@ $(function () {
if (DASH.can('moderate_properties')) {
serverTable('#pendingPropsTable', '/api/tables/pending_properties', [
{ data: 'id', orderable: false },
{ data: 'name', orderable: false, render: function (d, t, row) { return fmt.link('/properties/' + row.id, d || '(unnamed)'); } },
{ data: 'name', orderable: false, render: function (d, t, row) { return fmt.property(row.id, d); } },
{ data: 'owner_id', orderable: false, render: function (d, t, row) { return fmt.character(d, row.owner_name); } },
// Nothing built yet is worth knowing before approving it for everyone to visit
{ data: 'models', orderable: false, render: function (d) { return d ? esc(d) : fmt.badge('Empty', 'secondary'); } },

View File

@@ -62,7 +62,7 @@ $(function () {
var pending = document.getElementById('pendingOnly');
var table = serverTable('#propertiesTable', '/api/tables/properties', [
{ data: 'id' },
{ data: 'name', render: function (d, t, row) { return fmt.link('/properties/' + row.id, d || '(unnamed)'); } },
{ data: 'name', render: function (d, t, row) { return t === 'display' ? fmt.property(row.id, d) : d; } },
{ data: 'owner_id', render: function (d, t, row) { return fmt.character(d, row.owner_name); } },
{ data: 'mod_approved', render: function (d) { return d ? fmt.badge('Approved', 'success') : fmt.badge('Unapproved', 'warning'); } },
{ data: 'reputation' },
@@ -95,7 +95,7 @@ $(function () {
if (!slots.length) { slotsEl.innerHTML = '<div class="col text-body-secondary">No property worlds found in the client data.</div>'; return; }
slotsEl.innerHTML = slots.map(function (s) {
var showing = s.showing
? fmt.link('/properties/' + s.showing.id, s.showing.name || '(unnamed)') + ' <span class="text-body-secondary">by ' + esc(s.showing.owner_name) + '</span>'
? fmt.property(s.showing.id, s.showing.name) + ' <span class="text-body-secondary">by ' + esc(s.showing.owner_name) + '</span>'
: '<span class="text-body-secondary">Nothing (locked slot)</span>';
var warn = fullAuto ? '' : s.picked_unavailable ? '<div class="small text-warning mt-1">The picked property isn\'t an approved public property of ' + esc(s.zone_name) + ' (any more), so the slot falls back to Auto.</div>'
: s.picked_shown_elsewhere ? '<div class="small text-warning mt-1">The picked property is already shown in an earlier slot, so this one falls back to Auto.</div>' : '';