- Timestamp:
- 06/21/2026 03:54:13 PM (3 months ago)
- Branches:
- main
- Children:
- 1664f31
- Parents:
- 5e61b17
- File:
-
- 1 edited
-
src/views/pages/post-edit.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/post-edit.ejs
r5e61b17 r11b3ba5 208 208 <span>🔒 <%= t('pedit.fan_only_label') %></span> 209 209 </label> 210 <div style="margin-top:8px"> 211 <label style="display:block;font-size:12.5px;opacity:.8;margin-bottom:4px">📅 <%= t('pedit.publish_at_label') %></label> 212 <input type="datetime-local" name="publish_at" value="<%= post.publish_at ? String(post.publish_at).replace(' ','T').slice(0,16) : '' %>" style="padding:8px 10px;border-radius:8px;border:1px solid var(--rule,rgba(128,128,128,.4));background:transparent;color:inherit"> 210 <% var _scheduled = !!(post.publish_at && (post.status === 'scheduled' || Date.parse(String(post.publish_at).replace(' ', 'T')) > Date.now())); %> 211 <label class="pe-checkbox" style="margin-top:8px"> 212 <input type="checkbox" name="schedule_enabled" value="1" id="pe-sched-toggle" <%= _scheduled ? 'checked' : '' %>> 213 <span>📅 <%= t('pedit.schedule_label') %></span> 214 </label> 215 <div id="pe-sched-fields" style="margin-top:6px;<%= _scheduled ? '' : 'display:none' %>"> 216 <label style="display:block;font-size:12.5px;opacity:.8;margin-bottom:4px"><%= t('pedit.publish_at_label') %></label> 217 <input type="datetime-local" name="publish_at" <%= _scheduled ? '' : 'disabled' %> value="<%= post.publish_at ? String(post.publish_at).replace(' ','T').slice(0,16) : '' %>" style="padding:8px 10px;border-radius:8px;border:1px solid var(--rule,rgba(128,128,128,.4));background:transparent;color:inherit"> 213 218 <% if (post.status === 'scheduled' && post.publish_at) { %><div style="font-size:12px;opacity:.7;margin-top:4px">⏳ <%= t('pedit.scheduled_for', { d: post.publish_at }) %></div><% } %> 219 <div style="font-size:11.5px;opacity:.65;margin-top:4px"><%= t('pedit.schedule_hint') %></div> 214 220 </div> 221 <script> 222 (function () { 223 var cb = document.getElementById('pe-sched-toggle'); 224 var box = document.getElementById('pe-sched-fields'); 225 if (!cb || !box) return; 226 var inp = box.querySelector('input[name="publish_at"]'); 227 function sync() { box.style.display = cb.checked ? '' : 'none'; if (inp) inp.disabled = !cb.checked; } 228 cb.addEventListener('change', sync); sync(); 229 })(); 230 </script> 215 231 <% } %> 216 232 </div>
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)