${userEmail && hasToken
? html`
${authData?.user?.picture
? html`

`
: ""}
${authData?.user?.name || userEmail}
${userEmail}
`
: ""}
${hasToken
? html`
`
: html`
`} ${this.authStatus
? html`
${this.authStatus}
`
: ""}
${"" /* Auth result is persisted to the auth cell; no need to display raw JSON */}
`;
}
static override styles = [
BaseElement.baseStyles,
css`
.oauth-wrapper {
padding: var(--cf-theme-spacing-loose, 1.5rem);
border-radius: var(
--cf-theme-border-radius,
var(--cf-border-radius-lg, 0.5rem)
);
background-color: var(
--cf-theme-color-surface,
var(--cf-colors-white, #ffffff)
);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 600px;
}
.profile-section {
display: flex;
align-items: center;
gap: var(--cf-theme-spacing-loose, 1.25rem);
margin-bottom: var(--cf-theme-spacing-loose, 1.5rem);
}
.profile-picture {
width: 80px;
height: 80px;
border-radius: 50%;
object-fit: cover;
}
.user-info {
flex: 1;
}
.user-name {
margin: 0;
font-size: 1.5rem;
color: var(--cf-theme-color-text, #111827);
font-weight: 600;
}
.user-email {
margin: 0.25rem 0 0;
color: var(
--cf-theme-color-text-muted,
#6b7280
);
}
.action-section {
display: flex;
flex-direction: column;
gap: var(--cf-theme-spacing-normal, 1rem);
margin-bottom: var(--cf-theme-spacing-loose, 1.5rem);
}
.oauth-button {
color: white;
border: none;
padding: var(--cf-theme-spacing-normal, 0.75rem)
var(--cf-theme-spacing-loose, 1.5rem);
border-radius: var(
--cf-theme-border-radius,
var(--cf-border-radius-md, 0.375rem)
);
cursor: pointer;
font-weight: 500;
font-size: 1rem;
font-family: var(--cf-theme-font-family, inherit);
transition: background-color var(--cf-theme-animation-duration, 0.2s) ease;
}
.oauth-button:hover {
filter: brightness(0.9);
}
.oauth-button:disabled {
background-color: var(
--cf-theme-color-border,
#d1d5db
) !important;
cursor: not-allowed;
}
.status-message {
padding: var(--cf-theme-spacing-normal, 0.75rem);
border-radius: var(
--cf-theme-border-radius,
var(--cf-border-radius-md, 0.375rem)
);
background-color: var(--cf-oauth-status-bg, #f0f4f8);
color: var(--cf-oauth-status-color, #333);
font-size: 0.9rem;
}
.oauth-button.logout {
background-color: var(
--cf-theme-color-error,
var(--cf-colors-red-600, #dc2626)
) !important;
}
.oauth-button.logout:hover {
background-color: var(
--cf-theme-color-error,
var(--cf-colors-red-700, #b91c1c)
) !important;
}
`,
];
}