mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-08 06:35:12 -04:00
i18n player.tmpl
This commit is contained in:
parent
2d673ca154
commit
7efd6d34ef
@ -1,6 +1,6 @@
|
|||||||
{{ template "layout" . }}
|
{{ template "layout" . }}
|
||||||
|
|
||||||
{{ define "title" }}{{ .Player.Name }} - {{ .App.Config.ApplicationName }}{{ end }}
|
{{ define "title" }}{{ .Player.Name }}{{ end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
|
|
||||||
@ -8,16 +8,14 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ if .AdminView }}
|
{{ if .AdminView }}
|
||||||
<a href="{{ .App.FrontEndURL }}/web/user/{{ .PlayerUser.UUID }}">Back to {{ .PlayerUser.Username }}'s account</a>
|
<a href="{{ .App.FrontEndURL }}/web/user/{{ .PlayerUser.UUID }}">{{ call .T "Back to %s's account" .PlayerUser.Username }}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a href="{{ .App.FrontEndURL }}/web/user">Back to your account</a>
|
<a href="{{ .App.FrontEndURL }}/web/user">{{ call .T "Back to your account" }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 style="text-align: center;">{{ .Player.Name }}</h1>
|
<h1 style="text-align: center;">{{ .Player.Name }}</h1>
|
||||||
{{/* prettier-ignore-start */}}
|
|
||||||
<h6 style="text-align: center;">{{ .Player.UUID }}<br />{{ .PlayerID }}</h6>
|
<h6 style="text-align: center;">{{ .Player.UUID }}<br />{{ .PlayerID }}</h6>
|
||||||
{{/* prettier-ignore-end */}}
|
|
||||||
{{ if .SkinURL }}
|
{{ if .SkinURL }}
|
||||||
<div id="skin-container" style="min-height: 300px;">
|
<div id="skin-container" style="min-height: 300px;">
|
||||||
<noscript>
|
<noscript>
|
||||||
@ -29,7 +27,7 @@
|
|||||||
<canvas id="skin-canvas" class="noscript-hidden"></canvas>
|
<canvas id="skin-canvas" class="noscript-hidden"></canvas>
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
No skin yet.
|
{{ call .T "No skin yet." }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<form
|
<form
|
||||||
action="{{ .App.FrontEndURL }}/web/update-player"
|
action="{{ .App.FrontEndURL }}/web/update-player"
|
||||||
@ -38,9 +36,15 @@
|
|||||||
>
|
>
|
||||||
{{ if or .App.Config.AllowChangingPlayerName .User.IsAdmin }}
|
{{ if or .App.Config.AllowChangingPlayerName .User.IsAdmin }}
|
||||||
<p>
|
<p>
|
||||||
<label for="player-name"
|
<label for="player-name">{{ if .AdminView }}{{call .T
|
||||||
>Player Name (can be different from {{ if .AdminView }}{{ .PlayerUser.Username }}'s{{ else }}your{{ end }} {{ .App.Config.ApplicationName }} username)</label
|
"Player name (can be different from %s's %s username)"
|
||||||
><br />
|
.PlayerUser.Username
|
||||||
|
.App.Config.ApplicationName
|
||||||
|
}}{{ else }}{{ call .T
|
||||||
|
"Player name (can be different from your %s username)"
|
||||||
|
.App.Config.ApplicationName
|
||||||
|
}}{{ end }}</label>
|
||||||
|
<br />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="playerName"
|
name="playerName"
|
||||||
@ -50,37 +54,37 @@
|
|||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if or .App.Config.AllowSkins .User.IsAdmin }}
|
{{ if or .App.Config.AllowSkins .User.IsAdmin }}
|
||||||
<h4>Skin</h4>
|
<h4>{{ call .T "Skin" }}</h4>
|
||||||
{{ if .SkinURL }}
|
{{ if .SkinURL }}
|
||||||
<p>
|
<p>
|
||||||
<span style="vertical-align: top">Current skin: </span>
|
<span style="vertical-align: top">{{ call .T "Current skin:" }}</span>
|
||||||
<img class="small-texture-preview" src="{{ .SkinURL }}">
|
<img class="small-texture-preview" src="{{ .SkinURL }}">
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
<label for="skin-file">Upload a skin</label><br />
|
<label for="skin-file">{{ call .T "Upload a skin" }}</label><br />
|
||||||
<input type="file" name="skinFile" id="skin-file" />
|
<input type="file" name="skinFile" id="skin-file" />
|
||||||
</p>
|
</p>
|
||||||
{{ if or .App.Config.AllowTextureFromURL .User.IsAdmin }}
|
{{ if or .App.Config.AllowTextureFromURL .User.IsAdmin }}
|
||||||
<p>
|
<p>
|
||||||
<label for="skin-url">or instead, provide a URL to a skin</label><br />
|
<label for="skin-url">{{ call .T "or instead, provide a URL to a skin" }}</label><br />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="skinUrl"
|
name="skinUrl"
|
||||||
id="skin-url"
|
id="skin-url"
|
||||||
class="long"
|
class="long"
|
||||||
placeholder="Leave blank to keep"
|
placeholder="{{ call .T "Leave blank to keep" }}"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
<label for="delete-skin"
|
<label for="delete-skin">{{ call .T
|
||||||
>or instead, check the box to delete the current skin
|
"or instead, check the box to delete the current skin"
|
||||||
</label>
|
}}</label>
|
||||||
<input type="checkbox" name="deleteSkin" id="delete-skin" />
|
<input type="checkbox" name="deleteSkin" id="delete-skin" />
|
||||||
</p>
|
</p>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Skin model</legend>
|
<legend>{{ call .T "Skin model" }}</legend>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
id="skin-model-classic"
|
id="skin-model-classic"
|
||||||
@ -88,7 +92,7 @@
|
|||||||
value="classic"
|
value="classic"
|
||||||
{{ if eq .Player.SkinModel "classic" }}checked{{ end }}
|
{{ if eq .Player.SkinModel "classic" }}checked{{ end }}
|
||||||
/>
|
/>
|
||||||
<label for="skin-model-classic">Classic</label>
|
<label for="skin-model-classic">{{ call .T "Classic" }}</label>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
id="skin-model-slim"
|
id="skin-model-slim"
|
||||||
@ -96,45 +100,46 @@
|
|||||||
value="slim"
|
value="slim"
|
||||||
{{ if eq .Player.SkinModel "slim" }}checked{{ end }}
|
{{ if eq .Player.SkinModel "slim" }}checked{{ end }}
|
||||||
/>
|
/>
|
||||||
<label for="skin-model-slim">Slim</label>
|
<label for="skin-model-slim">{{ call .T "Slim" }}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if or .App.Config.AllowCapes .User.IsAdmin }}
|
{{ if or .App.Config.AllowCapes .User.IsAdmin }}
|
||||||
<h4>Cape</h4>
|
<h4>{{ call .T "Cape" }}</h4>
|
||||||
{{ if .CapeURL }}
|
{{ if .CapeURL }}
|
||||||
<p>
|
<p>
|
||||||
<span style="vertical-align: top">Current cape: </span>
|
<span style="vertical-align: top">{{ call .T "Current cape:" }}</span>
|
||||||
<img class="small-texture-preview" src="{{ .CapeURL }}">
|
<img class="small-texture-preview" src="{{ .CapeURL }}">
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
<label for="cape-file">Upload a cape</label><br />
|
<label for="cape-file">{{ call .T "Upload a cape" }}</label><br />
|
||||||
<input type="file" name="capeFile" id="cape-file" />
|
<input type="file" name="capeFile" id="cape-file" />
|
||||||
</p>
|
</p>
|
||||||
{{ if or .App.Config.AllowTextureFromURL .User.IsAdmin }}
|
{{ if or .App.Config.AllowTextureFromURL .User.IsAdmin }}
|
||||||
<p>
|
<p>
|
||||||
<label for="cape-url">or instead, provide a URL to a cape</label><br />
|
<label for="cape-url">{{ call .T "or instead, provide a URL to a cape" }}</label><br />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="capeUrl"
|
name="capeUrl"
|
||||||
id="cape-url"
|
id="cape-url"
|
||||||
class="long"
|
class="long"
|
||||||
placeholder="Leave blank to keep"
|
placeholder="{{ call .T "Leave blank to keep" }}"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
<label for="delete-cape"
|
<label for="delete-cape">{{ call .T
|
||||||
>or instead, check the box to delete the current cape
|
"or instead, check the box to delete the current cape"
|
||||||
</label>
|
}}</label>
|
||||||
<input type="checkbox" name="deleteCape" id="delete-cape" />
|
<input type="checkbox" name="deleteCape" id="delete-cape" />
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .App.Config.ForwardSkins }}
|
{{ if .App.Config.ForwardSkins }}
|
||||||
<p>
|
<p>
|
||||||
<label for="fallback-player">Fallback Player</label><br />
|
<label for="fallback-player">{{ call .T "Fallback Player" }}</label>
|
||||||
UUID or player name. If you don't set a skin or cape, this player's skin
|
<br>
|
||||||
on one of the fallback API servers will be used instead.<br />
|
<small>{{ call .T "UUID or player name. If you don't set a skin or cape, this player's skin on one of the fallback API servers will be used instead." }}</small>
|
||||||
|
<br>
|
||||||
<input
|
<input
|
||||||
class="long"
|
class="long"
|
||||||
type="text"
|
type="text"
|
||||||
@ -148,17 +153,17 @@
|
|||||||
<input hidden name="uuid" value="{{ .Player.UUID }}" />
|
<input hidden name="uuid" value="{{ .Player.UUID }}" />
|
||||||
<input hidden name="returnUrl" value="{{ .URL }}" />
|
<input hidden name="returnUrl" value="{{ .URL }}" />
|
||||||
<p style="text-align: center;">
|
<p style="text-align: center;">
|
||||||
<input type="submit" value="Save changes" />
|
<input type="submit" value="{{ call .T "Save changes" }}" />
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
{{ if or .App.Config.AllowAddingDeletingPlayers .User.IsAdmin }}
|
{{ if or .App.Config.AllowAddingDeletingPlayers .User.IsAdmin }}
|
||||||
<p>
|
<p>
|
||||||
<details>
|
<details>
|
||||||
<summary>Delete Player</summary>
|
<summary>{{ call .T "Delete Player" }}</summary>
|
||||||
<form
|
<form
|
||||||
action="{{ .App.FrontEndURL }}/web/delete-player"
|
action="{{ .App.FrontEndURL }}/web/delete-player"
|
||||||
method="post"
|
method="post"
|
||||||
onsubmit="return confirm('Are you sure? This action is irreversible.');"
|
onsubmit="return confirm('{{ call .T "Are you sure you want to delete the player “%s”? This action is irreversible." .Player.Name }}');"
|
||||||
>
|
>
|
||||||
<input hidden name="uuid" value="{{ .Player.UUID }}" />
|
<input hidden name="uuid" value="{{ .Player.UUID }}" />
|
||||||
<input
|
<input
|
||||||
@ -170,7 +175,7 @@
|
|||||||
{{ .App.FrontEndURL }}/web/user
|
{{ .App.FrontEndURL }}/web/user
|
||||||
{{ end }}"
|
{{ end }}"
|
||||||
/>
|
/>
|
||||||
<input type="submit" value="Delete Player" />
|
<input type="submit" value="{{ call .T "Delete Player" }}" />
|
||||||
</form>
|
</form>
|
||||||
</details>
|
</details>
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user