Changeset d56d471 in Klonkt for src/assets/js
- Timestamp:
- 07/29/2026 12:36:50 PM (6 weeks ago)
- Branches:
- main
- Children:
- 7a93fcf
- Parents:
- 6100ce9
- File:
-
- 1 edited
-
src/assets/js/guardian.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/guardian.js
r6100ce9 rd56d471 361 361 setRow.appendChild(gateButton(w, 'shaer:externalEmbeds', w.embeds, T.embeds_propose, T.embeds_on, T.embeds_off)); 362 362 // The heavier sibling (5.6): seeing that a video exists is one decision, 363 // letting a third party's player run inside the app is another. Only 364 // offered once previews are on: you cannot play what you may not see. 365 if (w.embeds === true) { 363 // letting a third party's player run inside the app is another. Hidden 364 // only when previews are known-OFF: for a ward on another server the 365 // value is unknown, and unknown is not off. Hiding it there meant a 366 // guardian elsewhere could never even propose playback, which is how a 367 // whole proposal round went into the wrong gate. The ward's server 368 // enforces play-needs-previews at serve time regardless. 369 if (w.embeds !== false) { 366 370 setRow.appendChild(gateButton(w, 'shaer:externalPlayback', w.playback, T.play_propose, T.play_on, T.play_off)); 367 371 } 368 372 set.appendChild(setRow); 373 // What this guardian proposed and how it stands (5.6). This used to be a 374 // button caption that vanished on refresh, so a running decision was 375 // invisible: you could not tell "waiting", "done" and "expired" apart. 376 (w.proposals || []).forEach(function (p) { 377 var what = p.feature === 'shaer:externalPlayback' ? (T.prop_play || 'playback') : (T.prop_embeds || 'link previews'); 378 var line = (T.prop_line || 'Proposal {what} {value}: {status}') 379 .replace('{what}', what) 380 .replace('{value}', p.value ? (T.prop_on || 'on') : (T.prop_off || 'off')) 381 .replace('{status}', T['prop_st_' + p.status] || p.status); 382 set.appendChild(el('p', 'small g-prop g-prop-' + p.status, line)); 383 }); 369 384 panel.appendChild(set); 370 385 … … 377 392 w.guardians.forEach(function (g) { gsec.appendChild(availRow(g, uri)); }); 378 393 } else { 379 gsec.appendChild(el('p', 'g-empty small', T.panel_guards_remote || '')); 394 // A ward on another server: WHO guards it is public on its actor 395 // (shaer:guardians, 2.1), so list the seats; availability is the ward 396 // server's private ledger (3.6.1) and is not shown, only named. 397 var placeholder = el('p', 'g-empty small', '…'); 398 gsec.appendChild(placeholder); 399 fetch('/guardian/wards/guardians?site=' + encodeURIComponent(S.site) + '&uri=' + encodeURIComponent(uri)) 400 .then(function (r) { return r.json(); }) 401 .then(function (j) { 402 if (!j || !j.guardians || !j.guardians.length) { 403 placeholder.textContent = T.panel_guards_remote || ''; 404 return; 405 } 406 placeholder.remove(); 407 j.guardians.forEach(function (g) { 408 var row = el('div', 'row g-guard'); 409 row.appendChild(el('span', 'who grow', handleOf(g.uri, g.handle))); 410 gsec.appendChild(row); 411 }); 412 gsec.appendChild(el('p', 'g-empty small', T.panel_guards_far || '')); 413 }) 414 .catch(function () { placeholder.textContent = T.panel_guards_remote || ''; }); 380 415 } 381 416 panel.appendChild(gsec);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)