Login page: newer design from the canvas
- wheel with sample planets, ticks and aspect lines - "Continue with Google" in the site's button style (Google's own button lies invisibly on top and still returns the ID token) - new subtitle and account note Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -6,6 +6,35 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
import { api, errorText } from "@/lib/api";
|
||||
|
||||
/** Google's "G" mark (branding guidelines: unmodified, on the left of the label). */
|
||||
function GoogleMark() {
|
||||
return (
|
||||
<svg width="20" height="20" viewBox="0 0 48 48" aria-hidden="true">
|
||||
<path
|
||||
fill="#EA4335"
|
||||
d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
|
||||
/>
|
||||
<path
|
||||
fill="#4285F4"
|
||||
d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
|
||||
/>
|
||||
<path
|
||||
fill="#FBBC05"
|
||||
d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
|
||||
/>
|
||||
<path
|
||||
fill="#34A853"
|
||||
d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* "Continue with Google" in the site's own button style. Google's real
|
||||
* (rendered, invisible) button lies on top of it and receives the click, so
|
||||
* the sign-in still returns an ID token.
|
||||
*/
|
||||
export function GoogleLogin({ clientId, target }: { clientId: string; target: string }) {
|
||||
const router = useRouter();
|
||||
const slot = useRef<HTMLDivElement>(null);
|
||||
@@ -34,7 +63,7 @@ export function GoogleLogin({ clientId, target }: { clientId: string; target: st
|
||||
if (!ready || !google || !slot.current) return;
|
||||
google.accounts.id.initialize({ client_id: clientId, callback: onCredential, ux_mode: "popup", itp_support: true });
|
||||
google.accounts.id.renderButton(slot.current, {
|
||||
theme: "filled_black",
|
||||
theme: "outline",
|
||||
size: "large",
|
||||
text: "continue_with",
|
||||
shape: "rectangular",
|
||||
@@ -51,8 +80,15 @@ export function GoogleLogin({ clientId, target }: { clientId: string; target: st
|
||||
onReady={() => setReady(true)}
|
||||
onError={() => setError("Nem sikerült betölteni a Google-belépést. Ellenőrizd a hálózatot vagy a reklámblokkolót.")}
|
||||
/>
|
||||
<div ref={slot} className="gsi-slot" aria-busy={busy} />
|
||||
{busy && <p className="msg muted">Belépés…</p>}
|
||||
<div className="social-login" data-ready={ready} aria-busy={busy}>
|
||||
<span className="btn-social" aria-hidden="true">
|
||||
<span className="btn-social-icon">
|
||||
<GoogleMark />
|
||||
</span>
|
||||
{busy ? "Belépés…" : "Folytatás Google-fiókkal"}
|
||||
</span>
|
||||
<div ref={slot} className="gsi-overlay" />
|
||||
</div>
|
||||
{error && (
|
||||
<p className="msg msg-error" role="alert">
|
||||
{error}
|
||||
|
||||
Reference in New Issue
Block a user