{{ template "header.html" . }}
<main>
<div class="info">
<p>account - <a href="/logout?CSRF={{ .LogoutCSRF }}">logout</a>
<p>username: {{ .User.Name }}
<div>
<form id="aboutform" action="/saveuser" method="POST">
<input type="hidden" name="CSRF" value="{{ .UserCSRF }}">
<p>about me:
<br><textarea tabindex=1 name="whatabout">{{ .WhatAbout }}</textarea>

<p>trigger:
<br><input tabindex=1 name="trigger" value="{{ .User.Options.Trigger }}">

<p><label class="button" for="mentionall">mention all:</label>
<input tabindex=1 type="checkbox" id="mentionall" name="mentionall" value="mentionall" {{ if .User.Options.MentionAll }}checked{{ end }}><span></span>

<p><label class="button" for="inlineqts">inline quotes:</label>
<input tabindex=1 type="checkbox" id="inlineqts" name="inlineqts" value="inlineqts" {{ if .User.Options.InlineQuotes }}checked{{ end }}><span></span>

<p><label class="button" for="maps">apple map links:</label>
<input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span>

<p><label class="button" for="enabletotp">make logins hard:</label>
<input tabindex=1 type="checkbox" id="enabletotp" name="enabletotp" value="enabletotp" {{ if .User.Options.TOTP }}checked{{ end }}><span></span>

<p><label class="button" for="reaction">reaction:</label>
<select tabindex=1 name="reaction">
<option {{ and (eq .User.Options.Reaction "none") "selected" }}>none</option>
<option {{ and (eq .User.Options.Reaction "\U0001F9EC") "selected" }}>{{ "\U0001F9EC" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F680") "selected" }}>{{ "\U0001F680" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F9BE") "selected" }}>{{ "\U0001F9BE" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F5FF") "selected" }}>{{ "\U0001F5FF" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F3C6") "selected" }}>{{ "\U0001F3C6" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001FAC2") "selected" }}>{{ "\U0001FAC2" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F389") "selected" }}>{{ "\U0001F389" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F418") "selected" }}>{{ "\U0001F418" }}</option>
<option {{ and (eq .User.Options.Reaction "\U0001F9DB") "selected" }}>{{ "\U0001F9DB" }}</option>
</select>
<p><button tabindex=1>update settings</button>
</form>
</div>
<hr>
<div>
<form action="/chpass" method="POST">
<input type="hidden" name="CSRF" value="{{ .LogoutCSRF }}">
<p>change password
<p><input tabindex=1 type="password" name="oldpass"> - oldpass
<p><input tabindex=1 type="password" name="newpass"> - newpass
<p><button tabindex=1>change</button>
</form>
</div>
{{ if .User.Options.TOTP }}
<hr>
<div>
	<p>TOTP: {{ .User.Options.TOTP }}
</div>
{{ end }}
</main>
