You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v24.17.0: login-time support nag for non-supporters
Operators not supporting WolfStack (no paid licence, no paying Patreon pledge, no GitHub Sponsor self-attest) now get a freely dismissible modal once per login asking them to sponsor on GitHub or buy a licence. Supporters never see it; the login-prompt coordinator shows the welcome modal XOR the nag, never both.
- is_supporter() reuses the existing entitlement model (licence OR paying Patreon tier OR GitHub self-attest); GET /api/supporter/status drives it. Fail-safe: any error treats the user as a supporter, so a paying customer is never nagged.
- "I'm supporting already" checkbox cancels permanently: instant local flag plus honour-system server self-attest via POST /api/sponsor/github.
- Unit test for PatreonTier::is_paying (Free-exempt boundary).
Co-Authored-By: CodeWolf <paul@wolf.uk.com>
Co-Authored-By: Wolf Software Systems Ltd <paul@wolf.uk.com>
<p class="welcome-sub">WolfStack is built by a tiny independent team — no VC money, no ads, no telemetry, and every feature ships free to everyone. If it's useful to you, please consider chipping in to keep it that way.</p>
<p class="nag-once-note">We're asking for your support — this appears just once each time you sign in. Already a GitHub or Patreon supporter? Tick <strong>“I'm supporting already”</strong> and we'll stop asking for good — we can't auto-verify those, so it's on the honour system.</p>
// Tell the server this install supports WolfStack (honour-system; GitHub's
52158
+
// API can't be queried to verify the org's sponsors) so the declaration
52159
+
// persists across browsers and the operator counts as a supporter everywhere.
52160
+
// Best-effort: NAG_DECLARED_KEY already stops the nag in this browser, so a
52161
+
// failure here only means it didn't sync off-device.
52162
+
async function nagDeclareSupport() {
52163
+
try {
52164
+
const r = await fetch('/api/sponsor/github', {
52165
+
method: 'POST',
52166
+
headers: { 'Content-Type': 'application/json' },
52167
+
body: JSON.stringify({ enabled: true })
52168
+
});
52169
+
if (!r.ok) throw new Error('HTTP ' + r.status);
52170
+
if (typeof showToast === 'function') showToast('Thanks for supporting WolfStack — we won’t ask again.', 'success');
52171
+
} catch (_) {
52172
+
// Warning toasts must not auto-dismiss — duration 0 keeps it until dismissed.
52173
+
if (typeof showToast === 'function') showToast('Noted on this device — couldn’t sync to the server, so it may reappear on other browsers.', 'warning', 0);
52174
+
}
52093
52175
}
52094
52176
52095
52177
function showWelcomeModal() {
@@ -52124,7 +52206,7 @@ function welcomeStartCourse() {
0 commit comments