- Timestamp:
- 07/19/2026 05:38:25 PM (7 weeks ago)
- Branches:
- main
- Children:
- e9c9ae1
- Parents:
- feced2c
- git-author:
- Robin <roboburr@…> (07/19/2026 05:38:00 PM)
- git-committer:
- Robin <roboburr@…> (07/19/2026 05:38:25 PM)
- Location:
- src/views
- Files:
-
- 3 edited
-
pages/authorize-interaction.ejs (modified) (2 diffs)
-
pages/messages.ejs (modified) (1 diff)
-
partials/reply-editor.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/authorize-interaction.ejs
rfeced2c r5190152 41 41 </form> 42 42 </div> 43 <form method="post" action="/fediverse/<%= m.id %>/edit" class="fedi-edit-form"> 44 <textarea name="text" rows="3" maxlength="2000" class="fedi-edit-ta"><%= m.editable %></textarea> 45 <div class="fedi-edit-actions"><button type="submit" class="fedi-edit-save"><%= t('fedi.save_edit') %></button></div> 46 </form> 43 <div class="fedi-edit-form"> 44 <%- include('../partials/reply-editor', { 45 action: '/fediverse/' + m.id + '/edit', 46 placeholder: t('fedi.reply_ph'), 47 submitLabel: t('fedi.save_edit'), 48 rows: 3, 49 initialHtml: m.content, 50 initialText: m.editable, 51 defaultLang: m.language, 52 noAttach: true, 53 }) %> 54 </div> 47 55 </li> 48 56 <% }); %> … … 59 67 b.classList.toggle('is-open', open); 60 68 b.setAttribute('aria-expanded', open ? 'true' : 'false'); 61 if (open) { var ta = form.querySelector('textarea'); if (ta) ta.focus(); }69 if (open) { var ed = form.querySelector('.re-editor') || form.querySelector('textarea'); if (ed) ed.focus(); } 62 70 }); 63 71 })(); -
src/views/pages/messages.ejs
rfeced2c r5190152 78 78 <details class="msg-edit"> 79 79 <summary><%= t('fedi.edit') %></summary> 80 <form method="post" action="/fediverse/<%= n.outboxId %>/edit" class="msg-edit-form"> 81 <textarea name="text" rows="2" required><%= n.editable %></textarea> 82 <button type="submit" class="btn"><%= t('fedi.save_edit') %></button> 83 </form> 80 <div class="msg-edit-form"> 81 <%- include('../partials/reply-editor', { 82 action: '/fediverse/' + n.outboxId + '/edit', 83 placeholder: t('fedi.reply_ph'), 84 submitLabel: t('fedi.save_edit'), 85 rows: 2, 86 initialHtml: n.content, 87 initialText: n.editable, 88 defaultLang: n.language, 89 noAttach: true, 90 }) %> 91 </div> 84 92 </details> 85 93 <form method="post" action="/fediverse/<%= n.outboxId %>/delete" data-confirm="<%= t('fedi.delete_confirm') %>"> -
src/views/partials/reply-editor.ejs
rfeced2c r5190152 16 16 rows textarea rows for the no-JS fallback (default 3) 17 17 defaultLang preselected reply language (default: UI lang) 18 initialHtml prefill for EDIT mode (our own sanitized HTML) (optional) 19 initialText plain-text prefill for the no-JS textarea (optional) 20 noAttach true hides the media button (edits do not touch attachments) 18 21 %> 22 <% var _reInitHtml = (typeof initialHtml !== 'undefined' && initialHtml) || ''; %> 23 <% var _reInitText = (typeof initialText !== 'undefined' && initialText) || ''; %> 24 <% var _reNoAttach = (typeof noAttach !== 'undefined' && noAttach); %> 19 25 <% var _reLang = (typeof defaultLang !== 'undefined' && defaultLang) || (typeof lang !== 'undefined' ? lang : 'en'); %> 20 26 <form method="post" action="<%= action %>" class="re-form" data-re … … 36 42 <button type="button" data-cmd="list" title="<%= t('re.list') %>" aria-label="<%= t('re.list') %>">•≡</button> 37 43 <button type="button" data-cmd="quote" title="<%= t('re.quote') %>" aria-label="<%= t('re.quote') %>">❝</button> 38 <button type="button" data-cmd="attach" title="<%= t('re.attach') %>" aria-label="<%= t('re.attach') %>">📎</button> 39 <input type="file" class="re-file" accept="image/*,audio/*,video/*" multiple hidden> 44 <% if (!_reNoAttach) { %> 45 <button type="button" data-cmd="attach" title="<%= t('re.attach') %>" aria-label="<%= t('re.attach') %>">📎</button> 46 <input type="file" class="re-file" accept="image/*,audio/*,video/*" multiple hidden> 47 <% } %> 40 48 </div> 41 <input type="hidden" name="attachments" value=""> 42 <div class="re-attachments" hidden></div> 43 <textarea name="text" rows="<%= typeof rows !== 'undefined' ? rows : 3 %>" required placeholder="<%= placeholder %>"></textarea> 49 <% if (!_reNoAttach) { %> 50 <input type="hidden" name="attachments" value=""> 51 <div class="re-attachments" hidden></div> 52 <% } %> 53 <textarea name="text" rows="<%= typeof rows !== 'undefined' ? rows : 3 %>" required placeholder="<%= placeholder %>"><%= _reInitText %></textarea> 44 54 <div class="re-editor" contenteditable="true" role="textbox" aria-multiline="true" 45 data-ph="<%= placeholder %>" aria-label="<%= placeholder %>" hidden>< /div>55 data-ph="<%= placeholder %>" aria-label="<%= placeholder %>" hidden><%- _reInitHtml %></div> 46 56 <div class="re-foot"> 47 57 <select name="language" class="re-lang" aria-label="<%= t('re.lang') %>" hidden>
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)