source: Klonkt/src/views/pages/admin-paid.ejs@ 1d1fdc9

main
Last change on this file since 1d1fdc9 was 0475b13, checked in by roboburr <roboburr@…>, 5 weeks ago

Acht schone pagina's uit inline script naar modules (shaer-bqr, stap 3b)

Alle acht zonder EJS-interpolatie, dus ongewijzigd te verplaatsen: admin-help,
admin-epk, admin-paid, admin-settings, auth-register, admin-push, admin-site-edit
(2 blokken) en authorize-interaction (3 blokken).

Elke route zegt nu welke module hij wil via pageJs; de bootstrap in de shell
haalt hem op. Meerdere blokken uit een pagina belanden in EEN module, gescheiden
door een streep -- ze deelden toch al een pagina en een levensduur.

Templates compileren, modules syntactisch ok, suite 565/565. Het echte bewijs
per pagina is er via een LINK naartoe gaan; na een herlading werkt alles toch al.

Commit met expliciete paden, niet met -A: eerder vandaag veegde ik daarmee
andermans werk uit dezelfde werkmap mee.

  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[61e3daf]1<div class="container" style="max-width:640px;margin:1.5rem auto 3rem;padding:0 1rem">
[9a00f28]2 <h1 style="margin:0 0 .3rem"><%= t('apaid.t') %></h1>
[61e3daf]3 <p style="color:var(--ink-soft,#888);margin:0 0 1.2rem">
[9a00f28]4 <%= t('apaid.intro') %>
[61e3daf]5 </p>
6
[9a00f28]7 <% if (saved) { %><p style="color:var(--accent);font-weight:600"><%= t('apaid.saved') %></p><% } %>
[61e3daf]8 <% if (error) { %><p style="color:#c0392b"><%= error %></p><% } %>
9 <% if (!secretReady) { %>
[9a00f28]10 <p style="color:#c0392b"><%= t('apaid.nokey') %></p>
[61e3daf]11 <% } %>
12
13 <p style="margin:.2rem 0 1.2rem">
[9a00f28]14 <%= t('apaid.status') %>
[61e3daf]15 <% if (status.connected) { %>
[9a00f28]16 <strong style="color:var(--accent)"><%= t('apaid.connected') %></strong> (<%= t('apaid.campaign') %> <%= status.campaignId %>)
[61e3daf]17 <% } else if (status.configured) { %>
[9a00f28]18 <strong><%= t('apaid.configured') %></strong>
[61e3daf]19 <% } else { %>
[9a00f28]20 <strong><%= t('apaid.notyet') %></strong>
[61e3daf]21 <% } %>
22 </p>
23
[603d246]24 <div style="border:1px solid var(--border,#333);border-radius:10px;padding:.9rem 1rem;margin:0 0 1.3rem;background:color-mix(in srgb,var(--accent,#6b8f71) 8%,transparent)">
[9a00f28]25 <p style="margin:0 0 .4rem;font-weight:600"><%= t('apaid.redirect_h') %></p>
[603d246]26 <p style="margin:0 0 .6rem;color:var(--ink-soft,#888);font-size:.9rem">
[9a00f28]27 <%= t('apaid.redirect_p') %>
[603d246]28 </p>
29 <div style="display:flex;gap:.5rem;align-items:center">
30 <input id="pd-redirect" type="text" readonly value="<%= redirectUri %>" style="flex:1;min-width:0;font-family:monospace;font-size:.9rem">
[9a00f28]31 <button type="button" id="pd-copy" class="btn" data-copied="<%= t('apaid.copied') %>"><%= t('apaid.copy') %></button>
[603d246]32 </div>
33 </div>
34
[61e3daf]35 <form method="post" action="/admin/paid" style="display:flex;flex-direction:column;gap:.9rem">
[9a00f28]36 <label><%= t('apaid.client_id') %>
[61e3daf]37 <input type="text" name="client_id" value="<%= status.clientId || '' %>" autocomplete="off" style="width:100%">
38 </label>
[9a00f28]39 <label><%= t('apaid.client_secret') %>
40 <input type="password" name="client_secret" placeholder="<%= status.hasSecret ? t('apaid.unchanged') : '' %>" autocomplete="off" style="width:100%">
41 <small style="color:var(--ink-soft,#888)"><%= t('apaid.keep') %></small>
[61e3daf]42 </label>
[9a00f28]43 <label><%= t('apaid.campaign_id') %>
[61e3daf]44 <input type="text" name="campaign_id" value="<%= status.campaignId || '' %>" autocomplete="off" style="width:100%">
45 </label>
[9a00f28]46 <label><%= t('apaid.public_page') %>
[c3d12a6]47 <input type="url" name="patreon_url" value="<%= status.patreonUrl || '' %>" placeholder="https://www.patreon.com/jouwnaam" autocomplete="off" style="width:100%">
[9a00f28]48 <small style="color:var(--ink-soft,#888)"><%= t('apaid.public_help') %></small>
[c3d12a6]49 </label>
[9a00f28]50 <label><%= t('apaid.access') %>
51 <input type="password" name="access_token" placeholder="<%= t('apaid.unchanged') %>" autocomplete="off" style="width:100%">
[61e3daf]52 </label>
[9a00f28]53 <label><%= t('apaid.refresh') %>
54 <input type="password" name="refresh_token" placeholder="<%= t('apaid.unchanged') %>" autocomplete="off" style="width:100%">
55 <small style="color:var(--ink-soft,#888)"><%= t('apaid.token_help') %></small>
[61e3daf]56 </label>
[9a00f28]57 <label><%= t('apaid.min_eur') %>
[61e3daf]58 <input type="text" name="default_min_eur" value="<%= status.defaultMinCents ? (status.defaultMinCents/100).toFixed(2) : '' %>" inputmode="decimal" style="width:120px">
59 </label>
60 <div style="display:flex;gap:.6rem;align-items:center">
[9a00f28]61 <button type="submit" class="btn btn-primary"><%= t('apaid.save') %></button>
[61e3daf]62 </div>
63 </form>
64
65 <% if (status.configured || status.connected) { %>
[9a00f28]66 <form method="post" action="/admin/paid/disconnect" data-confirm="<%= t('apaid.disconnect_confirm') %>" style="margin-top:1rem">
67 <button type="submit" class="btn btn-danger"><%= t('apaid.disconnect') %></button>
[61e3daf]68 </form>
69 <% } %>
70
[9a00f28]71 <p style="margin-top:1.5rem"><a href="/admin">&larr; <%= t('admin.back') %></a></p>
[61e3daf]72</div>
[603d246]73
[0475b13]74<%# Het script van deze pagina staat in assets/js/mod/admin-paid.js (shaer-bqr). %>
Note: See TracBrowser for help on using the repository browser.