--- go-around-v49/mock.js
+++ designer/mock.js
@@ -11,9 +11,11 @@
/* ── LOGO SLOT: the only place the logo is set. Swap this file when the new logo arrives. ── */
var LOGO='assets/logo.png';
function logo(cls){return '';}
-document.getElementById('logoSlot').innerHTML=logo();
+document.getElementById('logoSlot').innerHTML=''; /* Designer: no logo mark until MT's logo is final */
var I={ /* simple line icons, no emoji */
+ passkey:'',
+ chev:'',
back:'',
mail:'',
lock:'',
@@ -75,7 +77,7 @@
function addDays(d,n){var x=new Date(d.getFullYear(),d.getMonth(),d.getDate());x.setDate(x.getDate()+n);return x;}
function addMonth(d){var y=d.getFullYear(),m=d.getMonth()+1,day=d.getDate();var last=new Date(y,m+1,0).getDate();return new Date(y,m,Math.min(day,last));}
var TODAY=new Date();
-var PLANS={founding:{name:'Founding Pilot',price:299,was:399,note:'First 50 members. Your price stays locked while you stay subscribed.'},
+var PLANS={founding:{name:'Founding Member',price:299,was:399,note:'First 50 members. Your price stays locked while you stay subscribed.'},
pro:{name:'Pro',price:399,note:'Every member tool, including anonymous reviews.'},
ato:{name:'ATO account',price:3999,note:'One account per ATO. Replies, page tools and stats.'}};
function rands(n,cents){var s=String(n).replace(/\B(?=(\d{3})+(?!\d))/g,',');return 'R'+s+(cents?'.00':'');}
@@ -141,16 +143,73 @@
if(ST==='signup-mismatch'){c.cls='bad';c.msg=I.x+'Passwords don\u2019t match. Type the same one twice.';c.msgCls='bad';}
cf='
'+inp(c)+'
';
}
- if(!up) pw.under='Forgot your password?';
+ if(!up) pw.under='Forgot password?';
var si=pb('Sign in',up?'gls':'pri',ST==='loading'?'loading':'',ST==='press'||ST==='loading'?'lg float':'lg');
var su=pb('Sign up',up?'pri':'gls',ST==='signup-mismatch'?'disabled':'','lg');
- return pg('
'+logo('logo-big')+'
'+(up?'Join Go Around.':'What every pilot needs.')+'
'+(up?'Type your password twice. Free to start, 14 days of Pro on us.':'Everything a pilot needs before take-off: weather, aerodromes, ATOs and DFEs in one place.')+'
'+
- '');
+ /* ── Designer (12 Nov 2026): order = Google · passkey · "or" · email + password · Forgot · Sign in | Sign up ·
+ email-code · guest. Google + passkey are NOT .pb pills so Go Around's tests (which find pills by text) keep passing.
+ ── NEXT SESSION — from Designer ──────────────────────────────────────────────────────────────────
+ Google : not in the code yet. Wire .gsi.google to GA_AUTH.startGoogleOAuth(up?'signup':'signin') and the
+ callback to GA_AUTH.handleOAuthCallback(state). See auth-hooks.js for the server steps.
+ Passkey : endpoints exist on job6/member-doorways (not live). Wire .alt-btn.passkey to GA_AUTH.passkeySignIn().
+ Hidden on sign-up on purpose: the server only lets a SIGNED-IN member add a passkey.
+ Email code: endpoints exist (job6). Wire a.email-code → GA_AUTH.sendEmailCode(email) → verify screen.
+ Password + Forgot: NOT in the server code yet (email-code only). Build /api/auth/password/* or drop them.
+ ─────────────────────────────────────────────────────────────────────────────────────────────────── */
+ var gsi='';
+ var pk=up?'':'';
+ /* ── Designer v3 (12 Nov 2026, MT t87): base = the FIRST sign-in Designer sent (build v1): title + lede on top,
+ the runway scene under it, then email, password, "Forgot", the Sign in | Sign up pill pair, a link row, legal.
+ Changes on top: NO "GO AROUND" name, no PAPI, no tower; official Google button; passkey; email code;
+ Browse as guest; and a blurred, dimmed layer (.dim) between the scene and every control.
+ Two faithful adjustments, picked with ?v=a | ?v=b (only the placement of Google / passkey and the dim layer differ):
+ A — Google + passkey ABOVE the email ("or with email" between); dim = a floating frosted panel.
+ B — the original order kept: email first; Google sits under the pair; the passkey stays in the original link row;
+ dim = a full-width layer that rises out of the runway with a soft, blurred top edge (no hard line).
+ The pair is the original one: both .pb pills, so Go Around's handlers and 81 tests are unchanged. ── */
+ var V=(Q.get('v')==='b')?'b':'a';
+ var scene=window.runwaySVG?'
'+runwaySVG()+'
':'';
+ var hero='
'+(up?'Create your account.':'What every pilot needs.')+'
'+(up?'Free to start. 14 days of Pro on us, no card.':'Weather, aerodromes, ATOs and DFEs, in one place.')+'
')+
+ acts(pb('Sign in','pri',code.length===6?'':'disabled')));
+},
+/* google — Designer: PREVIEW of the hand-off. In the live site Google's own page (accounts.google.com) opens here.
+ NEXT SESSION — from Designer: replace this screen with GA_AUTH.startGoogleOAuth(mode) (a redirect). On return,
+ GA_AUTH.handleOAuthCallback(state) decides: known member → back to the page; new → identity?via=google (name + email
+ prefilled, no password step). MT must create the Google Cloud OAuth client + consent screen first (NEXT-SESSION.md). */
+'google':function(){topBack(null);
+ var up=Q.get('mode')==='signup';
+ return pg(qwrap('
Design preview
'+(up?'Sign up with Google.':'Continue with Google.')+'
Google\u2019s own page opens here. You pick your account; Google shares your name and email address with Go Around.
'+
+ '
'+G+'Choose an account
'+
+ ''+
+ (up?'':'')+
+ '
No Google password is ever shared with Go Around.
')+acts('Back to sign in'));
+},
'forgot':function(){topBack(null);
var email=DB.get('email',DEMO.email);
if(ST==='sent')return pg('
Forgot password
Check your email.
If '+esc(email)+' has an account, a reset link is on its way. It works for 30 minutes.
'+
@@ -268,43 +327,43 @@
},
/* school-claim — "Is this your ATO?" kept */
'school-claim':function(){topBack([5,6]);
- var rows=[['SA','Skyline Aviation Academy','FAGC · Grand Central · ATO 0000'],['SA','Skyline Air Training','FALA · Lanseria · ATO 0000']];
+ var rows=[['SA','Demo ATO','FAGC · Grand Central · ATO 0000'],['SA','Demo ATO · Lanseria','FALA · Lanseria · ATO 0000']];
return pg(prog(5,6)+qwrap('
ATO
Is this your ATO?
One account per ATO. Pick it from the SACAA list, then tell us your role.
'+field({label:'Your role at the ATO',val:'Head of Training',right:''+I.down+'',df:'ato_role'})+field({label:'Work email',val:'training@skyline.example',icon:I.mail,df:'ato_email',msg:'We send a check link here. Use the ATO\u2019s own domain if you can.'})+'
')+
+ '
'+field({label:'Your role at the ATO',val:'Head of Training',right:''+I.down+'',df:'ato_role'})+field({label:'Work email',val:'training@your-ato.example',icon:I.mail,df:'ato_email',msg:'We send a check link here. Use the ATO\u2019s own domain if you can.'})+'
We\u2019ll confirm you speak for Skyline Aviation Academy. Next, pick your ATO plan.
'+
+ return pg(prog(5,6)+'
'+GTICK+'
Claim sent.
We\u2019ll confirm you speak for Demo ATO. Next, pick your ATO plan.
'+
'
Paid and Verified are separate. An ATO plan unlocks replies and your page tools. The Verified badge comes only after Go Around audits the ATO.
'+
acts(pb('Choose ATO plan','pri')));
},
/* NEW ato-plan — where an ATO claim lands (payment). MONTHLY ONLY (no-refund policy, MT t2627) */
'ato-plan':function(){topBack([6,6]);
- return pg(prog(6,6)+'
ATO plan
Your ATO plan.
For Skyline Aviation Academy. Pay now, or look around first. Your claim is checked either way.
'+
+ return pg(prog(6,6)+'
ATO plan
Your ATO plan.
For Demo ATO. Pay now, or look around first. Your claim is checked either way.
'+
MLINE+
'
ATO account
Replies, page tools and stats. Audit for Verified.
R3,999per month
'+
'
'+I.ok+'Reply to reviews on your ATO page
'+I.ok+'ATO page tools and stats
'+I.ok+'One account per ATO, for your team
'+
'
Renews every month until you cancel. No refunds for a month already started; cancel before the renewal date to stop the next charge. Paid and Verified are separate.
'+
acts(pb('Subscribe','pri')+'Pay later, look around first'));
},
-/* trial — v3.1: trial does NOT include anonymous reviews; paid upsell (Founding Pilot R299 / Pro R399) */
+/* trial — v3.1: trial does NOT include anonymous reviews; paid upsell (Founding Member R299 / Pro R399) */
'trial':function(){topBack([6,6]);
return pg(prog(6,6)+'
Welcome gift
14days of Pro, on us.
No card needed. Every Pro tool except anonymous reviews. When it ends you drop to Free, and nothing is charged.
'+
'
'+I.ok+'Aerodromes, weather and every tool
'+I.ok+'Reply to any review, edit yours for 15 min
'+I.ok+'Reviews on up to 10 ATOs a month
'+I.x+'Anonymous reviews are not in the trial
'+
'
Want to post anonymously?Anonymous reviews are for paying members only. Your free trial doesn\u2019t include them.'+
- '
Read all reviews, vote, 3 ATOs a month. Reviews with your name only. No tools.
R0always
'+
sect('For ATOs','One account per ATO')+
'
ATO account
Reply on your ATO page, page tools and stats. Audit for Verified.
R3,999per month
'+
- '
You pay on our payment partner\u2019s secure page. Paid plans renew every month until you cancel in Settings. No refunds for a month already started; cancel before the renewal date to stop the next charge. Unused trial days are added on top. Founding price is lost if you cancel.
'+
+ '
You pay on our payment partner\u2019s secure page. Paid plans renew every month until you cancel in Settings. No refunds for a month already started; cancel before the renewal date to stop the next charge. If you pay during your trial, the trial days left are dropped and your plan starts at once. Prices exclude VAT. Founding price is lost if you cancel.
'+
acts(pb(sold?'Subscribe to Pro':'Claim a founding seat','pri')+'Stay on the trial for now'));
},
'done':function(){noHead();
@@ -321,7 +380,7 @@
Same green tick as the DFE "Claim sent" screen (GTICK): same SVG, 112px size, colour and draw+pop animation. Nothing more.
Rows depend on the path: ?via= email|google|signin|reset, ?plan= trial|founding|pro|free|ato|ato-later, ?claim= dfe|ato */
var via=Q.get('via')||'', plan=Q.get('plan')||'trial', claim=Q.get('claim')||'';
- var back=(via==='signin'||via==='reset');
+ var back=(via==='signin'||via==='reset'||via==='passkey');
document.body.classList.add('scr-done');
function kv(k,v,mono){return '
'+kv('Plan','Pro trial')+kv('Days left','11 of 14',1)+'
';
+ card='
'+kv('Plan','Pro trial')+kv('Days left','11 of 14',1)+(via==='passkey'?kv('Signed in with','Passkey'):'')+'
';
}else{
head='
All set
'+greet('Welcome aboard')+'
';
var REN=fmtD(addMonth(TODAY)), TEND=fmtD(addDays(TODAY,14)), paid=Q.get('paid');
var P={
trial:['Your Pro trial has started.', kv('Plan','Pro trial')+kv('Days left','14 of 14',1)+'
'+kv('Trial ends',TEND)+kv('Card on file','None')+kv('After the trial','Free, unless you pick a plan')],
- founding:['Your Founding Pilot plan is active.', kv('Plan','Founding Pilot')+kv('Price','R299 / month',1)+kv('Renews',REN)+kv('Anonymous reviews','Included')],
+ founding:['Your Founding Member plan is active.', kv('Plan','Founding Member')+kv('Founding seat','No. 39 of 50',1)+kv('Price','R299 / month',1)+kv('Renews',REN)+kv('Anonymous reviews','Included')],
pro:['Your Pro plan is active.', kv('Plan','Pro')+kv('Price','R399 / month',1)+kv('Renews',REN)+kv('Anonymous reviews','Included')],
free:['Your free account is ready.', kv('Plan','Free')+kv('Card on file','None')+kv('Reviews','3 ATOs a month, with your name')+kv('Upgrade','Any time from Plans')],
ato:['Your ATO account is active.', kv('Plan','ATO account')+kv('Price','R3,999 / month',1)+kv('Renews',REN)+kv('Verified badge','After our audit')],
@@ -345,7 +404,10 @@
if(paid==='1')P[1]+=kv('Payment','Confirmed · receipt emailed');
if(paid==='pending'){P[1]=P[1].replace(kv('Card on file','None'),'').replace(kv('After the trial','Free, unless you pick a plan'),kv('Then','Your paid plan, once confirmed'));P[0]='Your Pro trial has started. We\u2019ll switch on your paid plan as soon as the payment is confirmed.';P[1]+=kv('Payment','Waiting for confirmation');}
lede='
'+P[0]+'
';
- card='
'+P[1]+(via==='google'?kv('Signed up with','Google'):'')+'
';
+ card='
'+P[1]+(via==='google'?kv('Signed up with','Google'):'')+'
'
+ /* Designer: offer a passkey right after the account exists (the server only allows it when signed in).
+ NEXT SESSION — from Designer: wire a.pk-add to GA_AUTH.passkeyRegister('iPhone'); hide when !GA_AUTH.passkeySupported(). */
+ card+='
Sign in faster next timeAdd a passkey. Face ID or Touch ID instead of a password.
RenewsEvery month on the '+next.getDate()+ordinal(next.getDate())+'
'+
'
Next charge'+rands(P.price,1)+' · '+fmtD(next)+'
'+
- (ato?'
ForSkyline Aviation Academy
':'')+
+ (ato?'
ForDemo ATO
':'')+
''+
'
'+I.lock+'
You\u2019ll be redirected to our secure payment partnerYou pay on their page. Your bank may ask you to approve (3-D Secure). Go Around never sees or stores your card number.
'+
''+
@@ -424,7 +486,7 @@
return pg('
'+
'
Confirming your payment.
We wait for the payment partner to confirm with our server before your plan unlocks. This takes a few seconds.
'+
'
'+I.ok+'
Payment received.
Your '+P.name+' plan is ready. A receipt is on its way to your email.
'+kvx('Plan',P.name)+(k==='founding'?kvx('Founding seat','No. 39 of 50',1):'')+kvx('Paid',rands(P.price,1)+' ZAR',1)+kvx('Next charge',fmtD(addMonth(TODAY)))+kvx('Reference',ref,1)+'
'+
'
'+I.info+'
Still confirming.
The payment partner hasn\u2019t confirmed yet. If you paid, your plan switches on as soon as they do, and we\u2019ll email you. Nothing is charged twice.
'+
'
'+kvx('Plan',P.name)+kvx('Status','Waiting for confirmation')+kvx('Reference',ref,1)+'
14 days of Pro, on us. No card.Then Founding Pilot R299 or Pro R399 per month. Monthly, cancel anytime before renewal.
';
+ '
14 days of Pro, on us. No card.Then Founding Member R299 or Pro R399 per month. Monthly, cancel anytime before renewal.
';
document.body.insertBefore(aside, document.body.firstChild);
return;
}
@@ -658,7 +720,7 @@
(function tapThrough(){
var Q=new URLSearchParams(location.search), S=Q.get('s')||'signin-a', ST=Q.get('state')||'idle';
var html=document.documentElement, capture=Q.has('capture'), DB=window.GADB;
- var CTX=['via','role','claim','plan','paid','layout'];
+ var CTX=['via','role','claim','plan','paid','layout','v'];
var reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;
function esc(s){return String(s==null?'':s).replace(/[&<>"']/g,function(c){return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c];});}
var MON=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
@@ -727,6 +789,22 @@
});
}
/* small toast, absolute (no position:fixed), transform/opacity only */
+ /* Designer: a faithful stand-in for the phone's OWN passkey sheet (Safari draws the real one; we can't style it).
+ NEXT SESSION — from Designer: delete this and call GA_AUTH.passkeySignIn() (navigator.credentials.get). */
+ function passkeySheet(done){
+ var w=document.createElement('div'); w.className='pk-wrap'; w.setAttribute('role','dialog'); w.setAttribute('aria-modal','true'); w.setAttribute('aria-label','Sign in with a passkey');
+ w.innerHTML='
Passkey addedNext time, tap \u201cSign in with a passkey\u201d.
'; }); });
on('.acts .pb',null,function(){ toast('End of the sign-up demo. Tap Restart to go again.'); showRestart(); });
on('.acts a.linkish','View my profile',function(){ go('profile',{state:null}); });
function showRestart(){ var a=$('.acts'); if(a && !a.querySelector('.rs')){ a.insertAdjacentHTML('beforeend','Restart'); on('.acts a.rs',null,function(){ DB.clear(); go('signin-a',{state:null,via:null,plan:null,claim:null,role:null,paid:null}); }); } }