{ i18n.T(ctx, p.TitleID) }
{ i18n.T(ctx, "consent.intro") }
-
for _, d := range docs {
- { i18n.T(ctx, LegalTitleID(d.Kind)) } }
if me.Support { { i18n.T(ctx, "support.contact") } }
{ i18n.T(ctx, "consent.decline") }
@accountDataBody(me)package web import ( "git.zb-server.de/ZB-Server/uptimesebi/internal/auth" "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" ) // IDPButton is a platform identity provider to sign in with. type IDPButton struct { URL, Name, Kind string } templ idpButtons(providers []IDPButton, labelID string) { if len(providers) > 0 {
{ i18n.T(ctx, "auth.or") }
} } // Login signs in; mfa starts at the second factor, after a provider // confirmed who it is. templ Login(p Page, signupAllowed bool, next string, providers []IDPButton, mfa bool) { @authShell(p) { if !mfa { @idpButtons(providers, "auth.sso.continue_with") }{ i18n.T(ctx, "auth.verify.resend_link") }
if signupAllowed {{ i18n.T(ctx, "auth.login.no_account") } { i18n.T(ctx, "auth.login.to_signup") }
} } } // Signup offers the providers people may sign up through and, if email // is set, the form for signing up with email and password. // SignupConsent lists the documents a new account accepts and their // versions, empty when the platform has none. type SignupConsent struct { Docs []LegalLink Versions string } // consentLinks names the documents as links, opening in a new tab so a // half-filled form survives reading them. templ consentLinks(docs []LegalLink) { for i, d := range docs { if i > 0 { { i18n.T(ctx, "consent.and") } } { i18n.T(ctx, "consent.doc."+d.Kind) } } } // consentField is the checkbox a sign-up form needs ticked. templ consentField(c SignupConsent) { if len(c.Docs) > 0 { } } templ Signup(p Page, providers []IDPButton, email bool, consent SignupConsent) { @authShell(p) { if email { @idpButtons(providers, "auth.sso.signup_with") if len(consent.Docs) > 0 && len(providers) > 0 {{ i18n.T(ctx, "consent.sso_hint") }
} } else {{ i18n.T(ctx, "auth.signup.to_login") }
} } templ SignupSent(p Page) { @authShell(p) {{ i18n.T(ctx, "auth.verify.sent") }
{ i18n.T(ctx, "auth.verify.sent_hint") }
{ i18n.T(ctx, "auth.verify.resend_link") }
} } // Verify confirms an address when the visitor presses the button. templ Verify(p Page, token string) { @authShell(p) { if token == "" {{ i18n.T(ctx, "error.verification_expired") }
{ i18n.T(ctx, "auth.verify.resend_link") }
} else {{ i18n.T(ctx, "auth.verify.resend_link") }
} } } templ ResendVerification(p Page) { @authShell(p) {{ i18n.T(ctx, "auth.signup.to_login") }
} } templ newOrgForm() { } // NewOrgPage creates an organization: the first, in a page of its own // since there is no console yet, or another one. templ NewOrgPage(p Page, me Me) { if len(me.Orgs) == 0 { @authShell(p) {{ i18n.T(ctx, "orgs.first_intro") }
@newOrgForm(){ i18n.T(ctx, "orgs.invited_hint") }
} } else { @consoleShell(p, me) { @settingsHeading("orgs.new_title", "orgs.new_intro"){ i18n.T(ctx, "consent.intro") }
if me.Support { { i18n.T(ctx, "support.contact") } }
{ i18n.T(ctx, "consent.decline") }
@accountDataBody(me){ i18n.T(ctx, "suspended.intro") }
if reason != "" {{ reason }
}{ i18n.T(ctx, "suspended.options") }
if me.Support { { i18n.T(ctx, "support.contact") } }
@accountDataBody(me)