Commit f68c055b authored by Ivanq's avatar Ivanq

Show correct username and usercert

parent ca14c136
......@@ -41,8 +41,8 @@
<main class="content">
<aside class="user-left">
<img src="../img/user.svg" class="user-avatar">
<div class="user-name">Nofish</div>
<div class="user-cert">nofish@zeroid.bit</div>
<div class="user-name" id="user_name"></div>
<div class="user-cert" id="user_cert">Loading...</div>
</aside>
<main class="user-right">
......@@ -67,6 +67,7 @@
<script type="text/javascript" src="../ZeroLib/ZeroAuth.js"></script>
<script type="text/javascript" src="../ZeroLib/ZeroDB.js"></script>
<script type="text/javascript" src="../ZeroLib/ZeroID.js"></script>
<script type="text/javascript" src="../workerout/workerout.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="../js/root.js"></script>
</body>
......
......@@ -11,8 +11,6 @@ let loadProfile = address => {
let user = location.search.replace(/[?&]wrapper_nonce=.*/, "").replace("?", "");
let userName;
loadProfile(user)
.then(profile => {
if(profile.commitName) {
......@@ -22,6 +20,12 @@ loadProfile(user)
return zeroID.findUserById(user)
.then(res => res.name);
})
.then(n => {
userName = n;
.then(userName => {
document.getElementById("user_name").textContent = userName;
return zeroID.findUserById(user)
.then(res => res.name);
})
.then(userCert => {
document.getElementById("user_cert").textContent = userCert + "@zeroid.bit";
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment