mirror of
https://github.com/unmojang/drasl.git
synced 2025-08-03 10:56:06 -04:00
74 lines
2.9 KiB
Cheetah
74 lines
2.9 KiB
Cheetah
{{ template "layout" . }}
|
|
|
|
{{ define "title" }}{{ call .T "Skin Verification" }}{{ end }}
|
|
|
|
{{ define "content" }}
|
|
{{ template "header" . }}
|
|
|
|
<p>{{ call .T
|
|
"We need to verify that you own the %s account “%s” before you register its UUID."
|
|
.App.Config.ImportExistingPlayer.Nickname
|
|
.PlayerName
|
|
}}</p>
|
|
|
|
<p>
|
|
{{ if .App.Config.ImportExistingPlayer.SetSkinURL }}{{ call .T
|
|
`Download this image and set it as your skin on your %s account, on <a target="_blank" href="%s">this page</a>.`
|
|
.App.Config.ImportExistingPlayer.Nickname
|
|
.App.Config.ImportExistingPlayer.SetSkinURL
|
|
}}{{ else }}{{ call .T
|
|
"Download this image and set it as your skin on your %s account."
|
|
.App.Config.ImportExistingPlayer.Nickname
|
|
}}{{ end }}</p>
|
|
|
|
<div style="text-align: center">
|
|
<img
|
|
src="data:image/png;base64,{{ .SkinBase64 }}"
|
|
width="256"
|
|
height="256"
|
|
style="image-rendering: pixelated; width: 256px;"
|
|
alt="{{ call .T "%s verification skin" .App.Config.ApplicationName }}"
|
|
/>
|
|
<p>
|
|
<a download="{{ call .T "%s-verification-skin.png" .PlayerName }}" href="data:image/png;base64,{{ .SkinBase64 }}">{{ call .T "Download skin" }}</a>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
{{ if eq .Action "register" }}
|
|
{{ if .UseIDToken }}
|
|
<p>{{ call .T "When you are done, hit “Register”." }}</p>
|
|
{{ else }}
|
|
<p>{{ call .T
|
|
"When you are done, enter a password for your %s account and hit “Register”."
|
|
.App.Config.ApplicationName
|
|
}}</p>
|
|
{{ end }}
|
|
<form action="{{ .App.FrontEndURL }}/web/register" method="post">
|
|
<input hidden type="text" name="playerName" value="{{ .PlayerName }}"
|
|
/>
|
|
{{ if not .UseIDToken }}
|
|
<input type="password" name="password" placeholder="{{ call .T "Password" }}" required />
|
|
{{ end }}
|
|
<input hidden type="checkbox" name="existingPlayer" checked />
|
|
<input hidden type="checkbox" name="useIdToken" {{ if .UseIDToken }}checked{{ end }} />
|
|
<input hidden name="challengeToken" value="{{ .ChallengeToken }}" />
|
|
<input hidden name="inviteCode" value="{{ .InviteCode }}" />
|
|
<input hidden name="returnUrl" value="{{ .URL }}" />
|
|
<input type="submit" value="{{ call .T "Register" }}" />
|
|
</form>
|
|
{{ else if eq .Action "create-player" }}
|
|
<p>{{ call .T "When you are done, hit “Create player”." }}</p>
|
|
<form action="{{ .App.FrontEndURL }}/web/create-player" method="post">
|
|
<input hidden name="userUuid" value="{{ .UserUUID }}"/>
|
|
<input hidden name="playerName" value="{{ .PlayerName }}"/>
|
|
<input hidden type="checkbox" name="existingPlayer" checked />
|
|
<input hidden name="challengeToken" value="{{ .ChallengeToken }}" />
|
|
<input hidden name="returnUrl" value="{{ .URL }}" />
|
|
<input type="submit" value="{{ call .T "Create player" }}" />
|
|
</form>
|
|
{{ end }}
|
|
|
|
{{ template "footer" . }}
|
|
{{ end }}
|