Changeset 9a00f28 in Klonkt for src/views/pages/paid-gate.ejs
- Timestamp:
- 07/22/2026 08:18:39 AM (7 weeks ago)
- Branches:
- main
- Children:
- 6b5d7da
- Parents:
- 96c714f
- git-author:
- Robin <roboburr@…> (07/22/2026 08:18:19 AM)
- git-committer:
- Robin <roboburr@…> (07/22/2026 08:18:39 AM)
- File:
-
- 1 edited
-
src/views/pages/paid-gate.ejs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/paid-gate.ejs
r96c714f r9a00f28 13 13 <section class="pg-card"> 14 14 <div class="pg-lock">💶</div> 15 <h2 class="pg-h2"> Voor supporters</h2>15 <h2 class="pg-h2"><%= t('pgate.h') %></h2> 16 16 <p class="pg-sub"> 17 Deze post is voor supporters van deze site 18 <% if (typeof pgCents !== 'undefined' && pgCents) { %>(vanaf €<%= (pgCents/100).toFixed(2) %> per maand op Patreon)<% } %>. 19 Word supporter en ontgrendel 'm daarna met een passkey. Geen account op deze site, geen cookie. 17 <% if (typeof pgCents !== 'undefined' && pgCents) { %><%= t('pgate.sub_cents', { eur: (pgCents/100).toFixed(2) }) %><% } else { %><%= t('pgate.sub') %><% } %> 20 18 </p> 21 19 22 20 <div class="pg-actions"> 23 21 <% if (_hasPatron) { %> 24 <a class="pg-btn" href="<%= pgPatronUrl %>" target="_blank" rel="noopener"> Word supporter op Patreon</a>25 <button type="button" id="pg-unlock" class="pg-btn pg-btn-ghost"> Al supporter? Ontgrendelen</button>22 <a class="pg-btn" href="<%= pgPatronUrl %>" target="_blank" rel="noopener"><%= t('pgate.join') %></a> 23 <button type="button" id="pg-unlock" class="pg-btn pg-btn-ghost"><%= t('pgate.unlock_have') %></button> 26 24 <% } else { %> 27 <button type="button" id="pg-unlock" class="pg-btn"> Ontgrendelen met Patreon</button>25 <button type="button" id="pg-unlock" class="pg-btn"><%= t('pgate.unlock') %></button> 28 26 <% } %> 29 27 </div> … … 38 36 var slug = "<%= pgSlug %>"; 39 37 var hasPatron = <%= _hasPatron ? 'true' : 'false' %>; 38 var I = { join: "<%= t('pgate.join_short') %>", confirm: "<%= t('pgate.confirm') %>", failed: "<%= t('pgate.failed') %>", error: "<%= t('pgate.error') %>" }; 40 39 var btn = document.getElementById('pg-unlock'); 41 40 var status = document.getElementById('pg-status'); … … 48 47 if (!window.SimpleWebAuthnBrowser || !window.PublicKeyCredential) { 49 48 if (hasPatron) { btn.style.display = 'none'; } 50 else { btn.textContent = 'Word supporter'; btn.addEventListener('click', toLink); }49 else { btn.textContent = I.join; btn.addEventListener('click', toLink); } 51 50 return; 52 51 } … … 54 53 btn.addEventListener('click', function () { 55 54 btn.disabled = true; 56 say( 'Bevestig met je passkey…');55 say(I.confirm); 57 56 fetch(base + '/paid/challenge?post=' + encodeURIComponent(slug)) 58 57 .then(function (r) { if (!r.ok) throw { link: true }; return r.json(); }) … … 75 74 toLink(); // no valid passkey yet (or lapsed tier): link via Patreon 76 75 } else { 77 btn.disabled = false; say( 'Ontgrendelen mislukt. Probeer opnieuw.', true);76 btn.disabled = false; say(I.failed, true); 78 77 } 79 78 }) … … 81 80 if (e && e.link) { toLink(); return; } 82 81 if (e && e.name === 'NotAllowedError') { toLink(); return; } // cancelled / no passkey -> link 83 btn.disabled = false; say( 'Er ging iets mis. Probeer opnieuw.', true);82 btn.disabled = false; say(I.error, true); 84 83 }); 85 84 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)