source: Klonkt/src/views/pages/guardian.ejs@ 42e7616

main
Last change on this file since 42e7616 was f1c50f9, checked in by Robin <roboburr@…>, 7 weeks ago

Guardian 2 wordt de nieuwe /guardian; oude v1 eruit

Robins besluit: /guardian2 is de canonieke Guardian-PWA, de oude /guardian mag
weg. guardian2 was een superset van v1 (kloon + meekijken, follow-gating,
cross-instance goedkeuring, wave, invite), dus er gaat niks verloren. De
"invite a guardian" blijft zichtbaar op de pagina maar is verder geparkeerd.

Alle paden/keys omgezet: /guardian2 -> /guardian, i18n guardian2.* -> guardian.*,
manifest-id klonkt-guardian-, short_name "Guardian". De v2-bestanden zijn
verwijderd en de v2-inhoud staat nu in de v1-bestanden. Push-URLs (follow-gating)
en de mount in server.js wijzen weer naar /guardian.

Changed files:
src/routes/guardian.js

  • vervangen door de v2-route (feed, follow-requests, wave, invite/join) op /guardian

src/views/pages/guardian.ejs

  • v2-view (wards-corner, volgverzoeken, invite-knop), titel weer "Guardian"

src/assets/js/guardian.js, src/assets/css/guardian.css

  • v2-client + styling

src/services/i18n.js

  • guardian2.* keys hernoemd naar guardian.*

src/services/ActivityPubService.js

  • push-URLs + comments /guardian2 -> /guardian

src/server.js

  • /guardian2-mount + import verwijderd; /guardian wijst naar de nieuwe route

Removed files:
src/routes/guardian2.js, src/views/pages/guardian2.ejs,
src/assets/js/guardian2.js, src/assets/css/guardian2.css

remarks: npm test 171/171; /guardian serveert de nieuwe inhoud, /guardian2 = 404.

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

  • Property mode set to 100644
File size: 4.0 KB
Line 
1<!DOCTYPE html>
2<html lang="<%= lang %>">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title><%= t('guardian.app_name') %></title>
7 <link rel="manifest" href="/guardian/manifest.webmanifest">
8 <link rel="icon" href="/guardian/icon.svg" type="image/svg+xml">
9 <meta name="theme-color" content="#ff6b35">
10 <link rel="stylesheet" href="/guardian/app.css">
11</head>
12<body>
13 <header class="g-head">
14 <span class="g-buoy">🛟</span>
15 <div class="g-head-txt">
16 <h1><%= t('guardian.app_name') %></h1>
17 <p class="g-sub"><%= t('guardian.tagline') %></p>
18 </div>
19 <% if (sites.length > 1) { %>
20 <select id="site-picker" aria-label="<%= t('guardian.acting_as') %>">
21 <% for (const s of sites) { %>
22 <option value="<%= s.slug %>" <%= s.slug === state.site ? 'selected' : '' %>>@<%= s.slug %></option>
23 <% } %>
24 </select>
25 <% } else { %>
26 <span class="g-me" title="<%= t('guardian.acting_as') %>">@<%= state.site %></span>
27 <% } %>
28 <form method="post" action="/guardian/invite" style="display:inline">
29 <button class="quiet small" type="submit">Invite a guardian</button>
30 </form>
31</header>
32
33 <main>
34 <!-- 0. Wards' corner: meelezen met je wards (read-only). -->
35 <section id="feed-section" hidden>
36 <div class="g-sec-head"><h2><%= t('guardian.feed_title') %></h2></div>
37 <p class="g-sec-sub"><%= t('guardian.feed_sub') %></p>
38 <div id="feed-list" class="g-list"></div>
39 </section>
40
41 <!-- 0b. Follow-verzoeken op je wards (FEP-633c §5.3). -->
42 <section id="follow-section" hidden>
43 <div class="g-sec-head"><h2><%= t('guardian.follow_title') %></h2></div>
44 <p class="g-sec-sub"><%= t('guardian.follow_sub') %></p>
45 <div id="follow-list" class="g-list"></div>
46 </section>
47
48 <!-- 1. Berichtencentrum: hulpverzoeken. Dat is waar dit voor bestaat. -->
49 <section id="help-section">
50 <div class="g-sec-head">
51 <h2><%= t('guardian.help_title') %></h2>
52 <span id="help-count" class="g-badge" hidden></span>
53 </div>
54 <p class="g-sec-sub"><%= t('guardian.help_sub') %></p>
55 <div id="help-list" class="g-list"></div>
56 <p id="help-empty" class="g-empty"><%= t('guardian.help_empty') %></p>
57 </section>
58
59 <!-- 2. Nieuwe ward adopteren. -->
60 <section id="adopt-section">
61 <div class="g-sec-head"><h2><%= t('guardian.adopt_title') %></h2></div>
62 <p class="g-sec-sub"><%= t('guardian.adopt_sub') %></p>
63 <form id="adopt-form" autocomplete="off">
64 <input id="adopt-handle" type="text" inputmode="email" autocomplete="off"
65 placeholder="@kind@server.eu" aria-label="<%= t('guardian.adopt_label') %>">
66 <button type="submit" id="adopt-btn"><%= t('guardian.adopt_btn') %></button>
67 </form>
68 <p id="adopt-msg" class="g-msg" hidden></p>
69 </section>
70
71 <!-- 3. Verzonden aanvragen (nog niet beantwoord). -->
72 <section id="pending-section" hidden>
73 <div class="g-sec-head"><h2><%= t('guardian.pending_title') %></h2></div>
74 <p class="g-sec-sub"><%= t('guardian.pending_sub') %></p>
75 <div id="pending-list" class="g-list"></div>
76 </section>
77
78 <!-- 4. Mijn wards (geaccepteerd). -->
79 <section id="wards-section">
80 <div class="g-sec-head"><h2><%= t('guardian.wards_title') %></h2></div>
81 <div id="wards-list" class="g-list"></div>
82 <p id="wards-empty" class="g-empty"><%= t('guardian.wards_empty') %></p>
83 </section>
84
85 <!-- 5. Meldingen. -->
86 <section id="push-section">
87 <div class="g-sec-head"><h2><%= t('guardian.push_title') %></h2></div>
88 <p class="g-sec-sub"><%= t('guardian.push_sub') %></p>
89 <button id="push-toggle" class="quiet" data-on-label="<%= t('guardian.push_off') %>"
90 data-off-label="<%= t('guardian.push_on') %>"><%= t('guardian.push_on') %></button>
91 <p id="push-msg" class="g-msg" hidden></p>
92 </section>
93 </main>
94
95 <script type="application/json" id="guardian-state"><%- JSON.stringify(state) %></script>
96 <script src="/guardian/app.js" defer></script>
97</body>
98</html>
Note: See TracBrowser for help on using the repository browser.