diff --git a/.gitignore b/.gitignore index c17f4d1..40190d3 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ dist/ *.pem *.ps1 *.py +secrets.local.php diff --git a/assets/css/table.css b/assets/css/table.css index 4dc5a92..0c5a7b0 100644 --- a/assets/css/table.css +++ b/assets/css/table.css @@ -1740,7 +1740,6 @@ text-transform: uppercase; letter-spacing: 0.07em; color: #7a5c2a; - margin-right: 5px; flex-shrink: 0; } @@ -1748,7 +1747,6 @@ display: inline-flex; align-items: center; flex-shrink: 0; - margin-right: 8px; } .fvt-btn { display: inline-flex; diff --git a/assets/css/ui.css b/assets/css/ui.css index 9d89938..debc949 100644 --- a/assets/css/ui.css +++ b/assets/css/ui.css @@ -1134,44 +1134,6 @@ .welcome-step-num { font-size: 0.75rem; } - margin-top: 80px; /* Ensure it sits below the fixed mobile header */ - } - .welcome-title { - font-size: 1.1rem; - } - .welcome-intro { - font-size: 0.85rem; - } - .welcome-step-text { - font-size: 0.85rem; - } - .welcome-step-title { - font-size: 0.9rem; - } - .welcome-step-body { - font-size: 0.8rem; - } - .welcome-cta { - font-size: 0.85rem; - } - .welcome-step-num { - font-size: 0.75rem; - } - .welcome-intro { - font-size: 0.85rem; - } - .welcome-step-text { - font-size: 0.85rem; - } - .welcome-step-title { - font-size: 0.9rem; - } - .welcome-step-body { - font-size: 0.8rem; - } - .welcome-cta { - font-size: 0.85rem; - } } .utci-fetch-time { text-align: right; diff --git a/assets/js/components/RestoreModal.js b/assets/js/components/RestoreModal.js index 7dced8b..427d424 100644 --- a/assets/js/components/RestoreModal.js +++ b/assets/js/components/RestoreModal.js @@ -45,7 +45,12 @@ export function RestoreModal({ onClose, setIsPro }) { }); const data = await res.json(); if (data.active) { - try { localStorage.setItem('sunscope_pro', '1'); } catch (err) { /* ignore */ } + try { + localStorage.setItem('sunscope_pro', '1'); + if (data.mode) localStorage.setItem('sunscope_pro_mode', data.mode); + if (data.customer) localStorage.setItem('sunscope_pro_customer', data.customer); + localStorage.setItem('sunscope_pro_checked_at', String(Date.now())); + } catch (err) { /* ignore */ } setIsPro(true); onClose(); return; diff --git a/assets/js/components/SubscribeModal.js b/assets/js/components/SubscribeModal.js index 47e409f..f15199d 100644 --- a/assets/js/components/SubscribeModal.js +++ b/assets/js/components/SubscribeModal.js @@ -22,8 +22,15 @@ import { Wordmark } from './Wordmark.js'; const html = htm.bind(h); -const SUBSCRIBE_URL = 'https://buy.stripe.com/9B63cw7vl8k15Ei9DQd7q00'; -const MANAGE_URL = 'https://billing.stripe.com/p/login/9B63cw7vl8k15Ei9DQd7q00'; +const SUBSCRIBE_URL = 'https://buy.stripe.com/9B63cw7vl8k15Ei9DQd7q00'; +// TODO: replace with the one-time Payment Link created in the Stripe +// Dashboard (see plan Part 3) - a flat-rate product with a few selectable +// price options (e.g. £3 / £5 / £10), since Stripe Payment Links don't +// support true customer-chosen amounts. Configure its after-payment +// redirect to https://sunscope.net/?session_id={CHECKOUT_SESSION_ID} +// the same way the monthly link should be. +const SUBSCRIBE_URL_ONEOFF = 'https://buy.stripe.com/REPLACE_WITH_ONEOFF_PAYMENT_LINK'; +const MANAGE_URL = 'https://billing.stripe.com/p/login/9B63cw7vl8k15Ei9DQd7q00'; export function SubscribeModal({ title, detail, onClose, openRestore }) { // Dismiss on Esc. @@ -77,10 +84,18 @@ export function SubscribeModal({ title, detail, onClose, openRestore }) { marginBottom: '18px', }}>£2 / month · cancel any time + style=${{ textDecoration: 'none', textAlign: 'center', marginBottom: '10px' }}> Subscribe — £2/month
+ Or make a one-off payment →