Changeset 151a72c in Klonkt for src/views/pages


Ignore:
Timestamp:
06/16/2026 06:46:10 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
eef691e
Parents:
4fee228
Message:

Circle UI: reason on its own line + clean word wrapping; message without duplicate URL

The outdated reason was pressed against the badge in a <small> with
word-break:break-all (intended for the URL) → broke in the middle of words.
Now a separate .circ-reason line with normal wrapping, and the proto message
no longer repeats the URL (the card already shows it).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-circle.ejs

    r4fee228 r151a72c  
    5858              <strong><%= l.label || l.remote_url %></strong>
    5959              <small><%= l.remote_url %></small>
    60               <small>
     60              <div class="circ-status">
    6161                <% if (l.status === 'active') { %>
    6262                  <span class="circ-badge ok">&#10003; actief</span>
    63                   <%= counts[l.id] || 0 %> posts
    64                   <% if (l.last_synced) { %>&middot; laatst: <%= l.last_synced %><% } %>
     63                  <span class="circ-meta"><%= counts[l.id] || 0 %> posts<% if (l.last_synced) { %> &middot; laatst: <%= l.last_synced %><% } %></span>
    6564                <% } else if (l.status === 'outdated') { %>
    6665                  <span class="circ-badge err">&#8635; versie-mismatch</span>
    67                   <%= l.last_error || 'Deze site draait een andere Klonkt-protocolversie — bijwerken nodig om te federeren.' %>
     66                  <div class="circ-reason"><%= l.last_error || 'Deze site draait een andere Klonkt-protocolversie — bijwerken nodig om te federeren.' %></div>
    6867                <% } else if (l.status === 'error') { %>
    6968                  <span class="circ-badge err">&#9888; fout</span>
    70                   <%= l.last_error || '' %>
     69                  <% if (l.last_error) { %><div class="circ-reason"><%= l.last_error %></div><% } %>
    7170                <% } else if (l.status === 'paused') { %>
    7271                  <span class="circ-badge">&#9208; gepauzeerd</span>
     
    7473                  <%# Onbekende status: toon 'm rauw + eventuele reden i.p.v. stil "gepauzeerd". %>
    7574                  <span class="circ-badge"><%= l.status %></span>
    76                   <%= l.last_error || '' %>
     75                  <% if (l.last_error) { %><div class="circ-reason"><%= l.last_error %></div><% } %>
    7776                <% } %>
    78               </small>
     77              </div>
    7978            </div>
    8079            <div class="circ-actions">
     
    111110.circ-main small { color: var(--ink-muted); font-size: .78rem; word-break: break-all; }
    112111.circ-actions { display: flex; gap: .4rem; flex-shrink: 0; }
    113 .circ-badge { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 20px; background: var(--rule); }
     112.circ-badge { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 20px; background: var(--rule); white-space: nowrap; }
    114113.circ-badge.ok { background: #d1fae5; color: #065f46; }
    115114.circ-badge.err { background: #fee2e2; color: #991b1b; }
     115.circ-status { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: .25rem; font-size: .78rem; color: var(--ink-muted); }
     116.circ-meta { color: var(--ink-muted); }
     117/* Reden op een eigen regel onder de badge; normale woordafbreking (geen break-all
     118   die hele zinnen midden in woorden knipt — dat zit op de URL-small, niet hier). */
     119.circ-reason { flex-basis: 100%; line-height: 1.4; color: var(--ink-muted); word-break: normal; overflow-wrap: anywhere; }
    116120.btn-danger { color: #991b1b; border-color: #fca5a5; }
    117121.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
Note: See TracChangeset for help on using the changeset viewer.