branding: friendly invite-only page instead of Gitea's raw Registration is disabled
A Windy account with no forge account (registration CLOSED at launch, Grant 09-23) lands on /user/link_account. Override shows invite-only + signed-in name + link to the dashboard; other cases = Gitea 1.24.6 template verbatim. No change to who can register. Orchestrator ask 09-23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
61
deploy/branding/templates/user/auth/link_account.tmpl
Normal file
61
deploy/branding/templates/user/auth/link_account.tmpl
Normal file
@@ -0,0 +1,61 @@
|
||||
{{/* Windy Git override of Gitea 1.24.6 templates/user/auth/link_account.tmpl.
|
||||
Forge registration is CLOSED at launch (Grant, 09-23), so a Windy account
|
||||
with no forge account used to land on Gitea's raw "Registration is disabled"
|
||||
error. That case now gets a plain invite-only page; every other case is
|
||||
Gitea's template unchanged (re-diff it on Gitea upgrades). No change to who
|
||||
can register. */}}
|
||||
{{if and .DisableRegistration (not .user_exists)}}
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="Windy Git is invite-only" class="page-content user link-account">
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column tw-my-5">
|
||||
<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
|
||||
<h4 class="ui top attached header center">Windy Git is invite-only while we launch</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>You're signed in with your Windy account{{if or .user_name .email}} as <strong>{{or .user_name .email}}</strong>{{end}}. Nothing is wrong with it: Windy Git just isn't open to every account yet.</p>
|
||||
<p>We'll let you know when it opens.</p>
|
||||
<a class="ui primary button" href="https://app.windyword.ai/dashboard">Back to your dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{else}}
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content user link-account">
|
||||
<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav">
|
||||
<div class="overflow-menu-items tw-justify-center">
|
||||
<!-- TODO handle .ShowRegistrationButton once other login bugs are fixed -->
|
||||
{{if not .AllowOnlyInternalRegistration}}
|
||||
<a class="item {{if not .user_exists}}active{{end}}"
|
||||
data-tab="auth-link-signup-tab">
|
||||
{{ctx.Locale.Tr "auth.oauth_signup_tab"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item {{if .user_exists}}active{{end}}"
|
||||
data-tab="auth-link-signin-tab">
|
||||
{{ctx.Locale.Tr "auth.oauth_signin_tab"}}
|
||||
</a>
|
||||
</div>
|
||||
</overflow-menu>
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column tw-my-5">
|
||||
{{/* these styles are quite tricky but it needs to be the same as the signin page */}}
|
||||
<div class="ui tab {{if not .user_exists}}active{{end}}" data-tab="auth-link-signup-tab">
|
||||
<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
|
||||
{{if .AutoRegistrationFailedPrompt}}<div class="ui message">{{.AutoRegistrationFailedPrompt}}</div>{{end}}
|
||||
{{template "user/auth/signup_inner" .}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui tab {{if .user_exists}}active{{end}}" data-tab="auth-link-signin-tab">
|
||||
<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
|
||||
{{template "user/auth/signin_inner" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "base/footer" .}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user