tools/module/discord/pages/index.go.html

143 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Discord | Melon Tools</title>
<style>
html, body {
background-color: #2a2c2d;
color: #d8d4d0;
}
a {
color: #4699fa;
}
.page-content {
display: flex;
flex-direction: row;
align-items: flex-start;
flex-wrap: wrap;
}
.connected-accounts li a[data-is-revoked=true] {
border: 2px solid red;
}
.guilds .guild-item {
margin: 8px;
border: 1px solid black;
padding: 8px;
border-radius: 8px;
}
.colour-block {
display: inline-block;
width: 18px;
height: 18px;
}
</style>
</head>
<body>
<h1>Discord | <a href="/">Melon Tools</a></h1>
<div class="page-content">
<div>
{{with .User}}
<p>My User: {{.Username}}#{{.Discriminator}}</p>
<ul>
<li>ID: {{.ID}}</li>
<li>Email: {{.Email}}</li>
<li>Username: {{.Username}}</li>
<li>Avatar: <img {{$.Avatar}} alt="User Avatar"/></li>
<li>Locale: {{.Locale}}</li>
<li>Discriminator: {{.Discriminator}}</li>
<li>Verified: {{.Verified}}</li>
<li>MFA: {{.MFAEnabled}}</li>
<li>Banner: <img {{$.Banner}} alt="User Banner"/></li>
<li>Accent Color: {{$.UserAccent}} <span class="colour-block"
style="background-color: {{$.UserAccent}}">&nbsp;</span>
</li>
<li>Bot: {{.Bot}}</li>
<li>Premium: {{.PremiumType}}</li>
<li>System: {{.System}}</li>
</ul>
{{end}}
</div>
<div>
{{with .User.PublicFlags}}
<p>My Flags:</p>
<ul>
{{if checkFlag . 1}}
<li>Discord Employee</li>
{{end}}
{{if checkFlag . 2}}
<li>Discord Partner</li>
{{end}}
{{if checkFlag . 4}}
<li>Hype Squad Events</li>
{{end}}
{{if checkFlag . 8}}
<li>Bug Hunter Level 1</li>
{{end}}
{{if checkFlag . 64}}
<li>House Bravery</li>
{{end}}
{{if checkFlag . 128}}
<li>House Brilliance</li>
{{end}}
{{if checkFlag . 256}}
<li>House Balance</li>
{{end}}
{{if checkFlag . 512}}
<li>Early Supporter</li>
{{end}}
{{if checkFlag . 1024}}
<li>Team User</li>
{{end}}
{{if checkFlag . 4096}}
<li>System</li>
{{end}}
{{if checkFlag . 16384}}
<li>Bug Hunter Level 2</li>
{{end}}
{{if checkFlag . 65536}}
<li>Verified Bot</li>
{{end}}
{{if checkFlag . 131072}}
<li>Verified Bot Developer</li>
{{end}}
{{if checkFlag . 262144}}
<li>Discord Certified Moderator</li>
{{end}}
</ul>
{{end}}
</div>
<div>
<p>Connections ({{len .Connections}}):</p>
<ul class="connected-accounts">
{{range .Connections}}
<li>
<a href="{{connectedLink .}}" target="_blank" data-is-revoked="{{.Revoked}}">
<img src="/discord/assets/icon/{{.Type}}.svg"/>
<span>{{.Name}}</span>
</a>
</li>
{{end}}
</ul>
</div>
<div>
<p>Guilds ({{len .Guilds}}):</p>
<div class="page-content guilds">
{{range $k, $v := .Guilds}}
<div class="guild-item">
<div><img {{index $.GuildIcons $k}}/></div>
<div>{{$v.Name}}</div>
<div>@*{{$v.ID}}</div>
</div>
{{end}}
</div>
</div>
</div>
</body>
</html>