Changeset bddbfe0 in Klonkt for src/views


Ignore:
Timestamp:
06/27/2026 12:04:36 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
dd7daef
Parents:
7cea873
Message:

feat(fedi): edit your own outbound replies (Update(Note))

  • services/ActivityPubService.js — deliverOutboxUpdate rewrites the stored reply (mention re-added + #tags re-linked) and federates an Update(Note); listOutbox exposes the plain editable text (outboxEditableText) to prefill the box; added to the default export.
  • routes/posts.js — POST /fediverse/:id/edit (owner only).
  • views/pages/authorize-interaction.ejs — an Edit details/textarea per reply in the manage list; + CSS.
  • services/i18n.js — fedi.edit / fedi.save_edit (NL/EN/DE).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/authorize-interaction.ejs

    r7cea873 rbddbfe0  
    4040              </form>
    4141            </div>
     42            <details class="fedi-edit">
     43              <summary class="fedi-edit-toggle"><svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg> <%= t('fedi.edit') %></summary>
     44              <form method="post" action="/fediverse/<%= m.id %>/edit" class="fedi-edit-form">
     45                <textarea name="text" rows="3" maxlength="2000" class="fedi-edit-ta"><%= m.editable %></textarea>
     46                <div class="fedi-edit-actions"><button type="submit" class="fedi-edit-save"><%= t('fedi.save_edit') %></button></div>
     47              </form>
     48            </details>
    4249          </li>
    4350        <% }); %>
     
    217224  @keyframes fedi-bm-nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
    218225  .fedi-bm-help { color: var(--ink-soft, #888); font-size: .82rem; line-height: 1.5; margin: .6rem 0 0; }
     226  .fedi-edit { margin: .4rem 0 0; }
     227  .fedi-edit > summary { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none;
     228    font-size: .78rem; font-weight: 600; color: var(--ink-soft, #888); padding: .2rem 0; }
     229  .fedi-edit > summary::-webkit-details-marker { display: none; }
     230  .fedi-edit[open] > summary { color: var(--accent); }
     231  .fedi-edit-form { margin: .5rem 0 0; }
     232  .fedi-edit-ta { width: 100%; box-sizing: border-box; min-height: 70px; resize: vertical; padding: .55rem .7rem;
     233    border: 1.5px solid var(--rule, #333); border-radius: 10px; background: var(--paper-2, #14141a); color: var(--ink, #eee); font: inherit; font-size: .9rem; }
     234  .fedi-edit-ta:focus { outline: none; border-color: var(--accent); }
     235  .fedi-edit-actions { display: flex; justify-content: flex-end; margin-top: .5rem; }
     236  .fedi-edit-save { padding: .4rem 1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--paper, #fff);
     237    font: inherit; font-weight: 600; font-size: .82rem; cursor: pointer; }
    219238</style>
    220239
Note: See TracChangeset for help on using the changeset viewer.