feat: Allow customising account image

This commit is contained in:
2025-02-03 15:42:16 +11:00
parent 35c3130e29
commit 520a6625f9
20 changed files with 82 additions and 27 deletions

View File

@@ -32,9 +32,21 @@
<h4 class="text-dark mb-4">Welcome Back!</h4>
</div>
<form class="user" method="post">
<div class="mb-3"><select class="form-control form-select form-select-lg form-control-user" name="account" value="default">
<div class="mb-3"><img class="border rounded-circle img-profile" id="accountIcon" src="/api/v1/icon/primary" width="50px" height="50px" style="width: 50px;height: 50px;display: inline;"><select id="accountSelect" class="form-control form-select form-select-lg form-control-user" name="account" style="display: inline;width:calc(100% - 60px);margin-left:10px;" onchange="updateIcon()">
{{wallets|safe}}
</select></div>
</select>
<script>
function updateIcon() {
var select = document.getElementById("accountSelect");
var selectedValue = select.value;
document.getElementById("accountIcon").src = "/api/v1/icon/" + selectedValue;
}
document.addEventListener("DOMContentLoaded", function () {
updateIcon();
});
</script>
</div>
<div class="mb-3"><input class="form-control form-control-user" type="password" id="exampleInputPassword" placeholder="Password" name="password"></div><button class="btn btn-primary d-block btn-user w-100" type="submit">Login</button>
<hr>
</form>