Changeset c06816e in Klonkt for src/views/pages/post-edit.ejs
- Timestamp:
- 07/01/2026 09:49:52 PM (2 months ago)
- Branches:
- main
- Children:
- 5a27ba4
- Parents:
- 8cf8b5f
- File:
-
- 1 edited
-
src/views/pages/post-edit.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/post-edit.ejs
r8cf8b5f rc06816e 262 262 placeholder="<%= t('pedit.nsfw_cw_ph') %>" 263 263 style="width:100%;box-sizing:border-box;margin:6px 0 2px;font-size:13px;padding:7px 9px"> 264 <% var _fediOpen = (typeof fediOpenAudio !== 'undefined' && fediOpenAudio); %> 264 265 <label class="pe-checkbox"> 265 <input type="checkbox" name="fedi_open_audio" value="1" <%= (typeof fediOpenAudio !== 'undefined' && fediOpenAudio) ? 'checked' : '' %>> 266 <%# One-way: once opened, the file has federated — re-gating would be false security, so the box locks. %> 267 <input type="checkbox" name="fedi_open_audio" value="1" id="pe-fedi-audio" <%= _fediOpen ? 'checked disabled' : '' %>> 266 268 <span>🌐 <%= t('pedit.fedi_audio_label') %></span> 267 269 </label> 270 <% if (_fediOpen) { %> 271 <p style="font-size:12px;opacity:.7;margin:2px 0 0 26px"><%= t('pedit.fedi_audio_locked') %></p> 272 <% } else { %> 273 <p id="pe-fedi-audio-warn" style="font-size:12px;color:#c0392b;margin:2px 0 0 26px" hidden>⚠️ <%= t('pedit.fedi_audio_oneway') %></p> 274 <script> 275 (function () { 276 var cb = document.getElementById('pe-fedi-audio'), w = document.getElementById('pe-fedi-audio-warn'); 277 if (cb && w && !cb.__wired) { cb.__wired = true; cb.addEventListener('change', function () { w.hidden = !cb.checked; }); } 278 })(); 279 </script> 280 <% } %> 268 281 <script> 269 282 (function () { … … 298 311 .pe-poll-dur { padding: 7px 9px; border-radius: 7px; border: 1px solid var(--rule, rgba(128,128,128,.35)); background: transparent; color: inherit; font-size: 13px; } 299 312 </style> 300 <div id="pe-poll-fields" class="pe-poll"<%= _poll ? '' : ' style="display:none"' %>> 313 <%# NB: keep the condition INSIDE the quoted attribute — escaped output (equals-tag) 314 turns a whole emitted style attribute into entity soup (fields showed always). %> 315 <div id="pe-poll-fields" class="pe-poll" style="<%= _poll ? '' : 'display:none' %>"> 301 316 <% if (_pollLocked) { %><p class="pe-poll-locked"><%= t('pedit.poll_locked') %></p><% } %> 302 317 <div id="pe-poll-opts" data-ph="<%= t('pedit.poll_option_ph') %>" data-del="<%= t('pedit.poll_remove') %>">
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)