Changeset 439f095 in Klonkt for src/views/pages/connect.ejs


Ignore:
Timestamp:
07/28/2026 11:48:34 PM (6 weeks ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
88d7c8f
Parents:
0202104
Message:

De guardians-lijst verhuist van Berichten naar Connect

Connect is de pagina die vertelt met wie je verbonden bent, en een guardian is
precies de verbinding die een kind nooit zou moeten hoeven zoeken. In Berichten
stond hij boven een stroom meldingen, waar hij bij elk bezoek langsschuift; op
Connect staat hij bij de andere relaties, met een eigen kader omdat het geen
mensen zijn die je zelf gekozen hebt te volgen.

De stippen en de labels gaan mee zoals ze waren: beschikbaar, afwezig tot een
datum, offline. In Berichten blijft het guardianship-aanbod staan, want dat is
wel een bericht: er wordt iets aan je gevraagd.

Changed files:
src/routes/posts.js

  • myGuardians van /messages naar /connect, met de handle-helper mee; de helper in /messages was daarmee dood en is weg

src/views/pages/messages.ejs

  • het blok en zijn opmaak eruit

src/views/pages/connect.ejs

  • de guardians-sectie bovenaan, met eigen opmaak

remarks: in de browser nagelopen, ook op 375px: drie guardians in drie staten
op Connect, Berichten houdt alleen nog het aanbod. 276 tests groen.

-robo
Co-Authored-By: Claude Opus 5 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/connect.ejs

    r0202104 r439f095  
    44  <% if (typeof success !== 'undefined' && success) { %><div class="alert alert-success"><%= success %></div><% } %>
    55  <% if (typeof error !== 'undefined' && error) { %><div class="alert alert-error"><%= error %></div><% } %>
     6
     7  <%# FEP-633c §2 + §3.6: who guards this account, and how available each of
     8      them is. Connect is the "who am I connected to" page, and a guardian is
     9      the one connection a ward should never have to hunt for. Availability in
     10      buddy-list language on the responsibility axis; the labels are UI, the
     11      wire keeps the spec terms. Never public: this page is the owner's. %>
     12  <% if (typeof myGuardians !== 'undefined' && myGuardians.length) { %>
     13    <section class="conn-guardians">
     14      <h2 class="conn-gtitle">&#128737; <%= t('msg.guardians_label') %></h2>
     15      <ul class="conn-glist">
     16        <% myGuardians.forEach(function(g){
     17             var _st = g.availability === 'away' ? 'away' : (g.availability === 'dormant' ? 'dormant' : 'active');
     18             var _lbl = _st === 'away' ? t('msg.g_away', { date: g.awayUntil ? formatDate(g.awayUntil) : '?' })
     19                      : (_st === 'dormant' ? t('msg.g_offline') : t('msg.g_available')); %>
     20          <li class="conn-guardian">
     21            <span class="conn-gdot conn-gdot--<%= _st %>" aria-hidden="true"></span>
     22            <span class="conn-ghandle"><%= g.handle %></span>
     23            <span class="conn-gstate"><%= _lbl %></span>
     24          </li>
     25        <% }); %>
     26      </ul>
     27    </section>
     28  <% } %>
    629
    730  <form method="post" action="/news/follow" class="tl-follow">
     
    83106
    84107<style>
     108  /* Guardians (FEP-633c 3.6): the buddy-list dot on the responsibility axis.
     109     Green available, yellow declared away with an end, grey observed dormant
     110     (one answer restores). Set apart from the follow list on purpose: these
     111     are not people you chose to follow, they are the ones looking after you. */
     112  .conn-guardians { margin: 0 0 1.25rem; padding: .8rem 1rem; border-radius: 12px;
     113    border: 1px solid color-mix(in srgb, var(--ink, #000) 10%, transparent);
     114    background: color-mix(in srgb, var(--ink, #000) 2.5%, transparent);
     115    border-left: 3px solid #35a2ff; }
     116  .conn-gtitle { margin: 0 0 .5rem; font-size: .95rem; }
     117  .conn-glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
     118  .conn-guardian { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
     119  .conn-gdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
     120  .conn-gdot--active { background: #4caf7d; }
     121  .conn-gdot--away { background: #e0a83a; }
     122  .conn-gdot--dormant { background: #8a93a3; }
     123  .conn-ghandle { font-weight: 600; }
     124  .conn-gstate { color: var(--ink-soft, #888); font-size: .82rem; }
    85125  .tl-wrap { max-width: 640px; margin: 1rem auto; padding: 0 1rem; }
    86126  .tl-title { margin: 0 0 .75rem; }
Note: See TracChangeset for help on using the changeset viewer.