Changeset 5b47619 in Klonkt for src/views/pages


Ignore:
Timestamp:
06/24/2026 02:03:55 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
075185a
Parents:
c73ac64
Message:

style(activitypub): tidy the /fediverse manage list into cards

Card-style list (no list numbers), muted recipient+date line, clean danger-style
Delete button, back link.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

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

    rc73ac64 r5b47619  
    22  <% if (typeof manage !== 'undefined' && manage) { %>
    33    <h1 class="auth-interact-title"><%= t('fedi.manage_title') %></h1>
    4     <% if (!manage.length) { %><p class="auth-interact-note"><%= t('fedi.manage_empty') %></p><% } %>
    5     <ol class="comments-list">
    6       <% manage.forEach(function(m){ %>
    7         <li class="comment">
    8           <div class="comment-body">
    9             <div class="comment-content"><%- m.content %></div>
    10             <div class="comment-actions">
    11               <% if (m.to_handle) { %><span class="fedi-handle">→ <%= m.to_handle %></span><% } %>
     4    <% if (!manage.length) { %>
     5      <p class="auth-interact-note"><%= t('fedi.manage_empty') %></p>
     6    <% } else { %>
     7      <ul class="fedi-manage">
     8        <% manage.forEach(function(m){ %>
     9          <li class="fedi-manage-item">
     10            <div class="fedi-manage-content"><%- m.content %></div>
     11            <div class="fedi-manage-foot">
     12              <span class="fedi-manage-meta"><% if (m.to_handle) { %>→ <%= m.to_handle %><% } %><% if (m.created_at && typeof formatDateTime === 'function') { %> · <%= formatDateTime(m.created_at) %><% } %></span>
    1213              <form method="post" action="/fediverse/<%= m.id %>/delete" onsubmit="return confirm('<%= t('fedi.delete_confirm') %>')">
    13                 <button type="submit" class="comment-delete-btn"><%= t('comments.delete') %></button>
     14                <button type="submit" class="fedi-del-btn"><%= t('comments.delete') %></button>
    1415              </form>
    1516            </div>
    16           </div>
    17         </li>
    18       <% }); %>
    19     </ol>
     17          </li>
     18        <% }); %>
     19      </ul>
     20    <% } %>
     21    <p class="auth-interact-note"><a href="/"><%= t('fedi.remote_back') %></a></p>
    2022  <% } else if (typeof sent !== 'undefined' && sent) { %>
    2123    <h1 class="auth-interact-title"><%= t('fedi.remote_sent_title') %></h1>
     
    8688  .auth-interact-orig { margin: .75rem 0 0; font-size: .85rem; }
    8789  .auth-interact-orig a { color: var(--accent, #06c); }
     90  .fedi-manage { list-style: none; padding: 0; margin: 1.25rem 0 1rem; display: flex; flex-direction: column; gap: .7rem; }
     91  .fedi-manage-item { padding: .85rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); }
     92  .fedi-manage-content { line-height: 1.5; overflow-wrap: anywhere; }
     93  .fedi-manage-content p { margin: .15rem 0; }
     94  .fedi-manage-content p:first-child { margin-top: 0; }
     95  .fedi-manage-content p:last-child { margin-bottom: 0; }
     96  .fedi-manage-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
     97  .fedi-manage-meta { color: var(--ink-soft, #999); font-size: .8rem; }
     98  .fedi-del-btn { border: 1px solid color-mix(in srgb, #d9534f 50%, transparent); background: color-mix(in srgb, #d9534f 12%, transparent); color: #e06b66; border-radius: 8px; padding: .3rem .75rem; font-size: .82rem; cursor: pointer; transition: background .15s ease; }
     99  .fedi-del-btn:hover { background: color-mix(in srgb, #d9534f 24%, transparent); }
    88100</style>
Note: See TracChangeset for help on using the changeset viewer.