{m}
"#)).unwrap_or_default(); - let (intro, google_block, action) = match (&fallback, ctx.google.is_some()) { - (Some(_), true) => ( - "Sign in with Google and every paper you build, submit and analyse is attached to that account, so a score is still there on the next device.", - format!( - r#" - -loading the Google button…
"#, - b = ctx.base, - next = esc(next) - ), - "sign in with an email instead", - ), - (None, true) => ( - "Google sign-in is available but its button did not get its parameters. Refresh the page, or use the form below.", - String::new(), - "sign in", - ), - _ => ( - "Google sign-in is switched off on this server because no client id was configured. The form below keys your papers to an email so the whole flow still works.", - String::new(), - "sign in", - ), + let google_on = ctx.google.is_some() && fallback.is_some(); + // Students are non-technical: one primary action, plain words, no jargon. + // Google first when configured (scores follow the account across devices); + // otherwise the name+email form, honestly labeled as this-device-only. + let google_block = if google_on { + format!( + r#"loading the Google button…
+Lost access on a new phone? Sign in with the same Google account and everything returns. With the email form, scores live in this browser only — there is no password to forget because there is no password.
{gsi_script}"#, - intro = intro, google_block = google_block, - action = action, + divider = divider, + email_head = email_head, + email_note = email_note, b = ctx.base, next = esc(next), e = e, diff --git a/static/style.css b/static/style.css index c0ba3c2..86a601a 100644 --- a/static/style.css +++ b/static/style.css @@ -232,3 +232,9 @@ input[type=text],input[type=email],input[type=number],select{min-height:44px;pad /* ===== mistake tagging ===== */ .mistake-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)} .btn.sm{min-height:36px;padding:7px 12px;font-size:.72rem} + +/* ===== sign-in ===== */ +.signin-primary{max-width:420px} +.signin-or{display:flex;align-items:center;gap:12px;max-width:420px;margin:18px 0 4px;color:var(--dim);font-size:.75rem} +.signin-or::before,.signin-or::after{content:"";flex:1;height:1px;background:var(--border)} +.signin-or span{padding:0 2px}