mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-21 02:56:45 -04:00

Resolves https://github.com/unmojang/drasl/issues/39 * Use __Host- cookie prefix instead of setting Domain See https://stackoverflow.com/a/64735551 * Unlinking OIDC accounts * AllowPasswordLogin, OIDC docs, cleanup * YggdrasilError * Migrate existing password users without login * API query/create/delete user OIDC identities * test APICreateOIDCIdentity * test APIDeleteeOIDCIdentity * API Create users with OIDC identities * OIDC: PKCE * Use YggdrasilError in authlib-injector routes * OIDC: AllowChoosingPlayerName * recipes.md: Update for OIDC and deprecated config options * OIDC: fix APICreateUser without password, validate oidcIdentities * OIDC: error at complete-registration if no preferred player name * Proper error pages * MC_ prefix for Minecraft Tokens
42 lines
1.2 KiB
Cheetah
42 lines
1.2 KiB
Cheetah
{{ define "header" }}
|
|
<nav class="header-nav">
|
|
<div>
|
|
<a class="logo" href="{{ .App.FrontEndURL }}">
|
|
<img
|
|
src="{{ .App.PublicURL }}/logo.svg"
|
|
alt="{{ .App.Config.ApplicationName }} logo"
|
|
/>{{ .App.Config.ApplicationName }}
|
|
</a>
|
|
</div>
|
|
<div style="text-align: right">
|
|
{{ if .User }}
|
|
{{ if .User.IsAdmin }}
|
|
<a href="{{ .App.FrontEndURL }}/web/admin">Admin</a>
|
|
{{ end }}
|
|
<a href="{{ .App.FrontEndURL }}/web/user"
|
|
>{{ .User.Username }}'s account</a
|
|
>
|
|
<form
|
|
style="display: inline"
|
|
action="{{ .App.FrontEndURL }}/web/logout"
|
|
method="post"
|
|
>
|
|
<input type="submit" value="Log out" />
|
|
</form>
|
|
{{ else }}
|
|
<a href="{{ .App.FrontEndURL }}/web/registration">Register</a>
|
|
{{ end }}
|
|
</div>
|
|
</nav>
|
|
|
|
{{ if .ErrorMessage }}
|
|
<p class="error-message">{{ .ErrorMessage }}</p>
|
|
{{ end }}
|
|
{{ if .SuccessMessage }}
|
|
<p class="success-message">{{ .SuccessMessage }}</p>
|
|
{{ end }}
|
|
{{ if .WarningMessage }}
|
|
<p class="warning-message">{{ .WarningMessage }}</p>
|
|
{{ end }}
|
|
{{ end }}
|