front: add link to user's profile
This commit is contained in:
parent
c831a019b2
commit
a7b0051d47
@ -112,12 +112,14 @@ class Client
|
||||
await this.me.init();
|
||||
document.getElementById('navbarLoggedOut').classList.add('d-none');
|
||||
document.getElementById('navbarLoggedIn').classList.remove('d-none');
|
||||
document.getElementById('myProfileLink').href = '/profiles/' + this.me.username;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.me = undefined;
|
||||
document.getElementById('navbarLoggedOut').classList.remove('d-none');
|
||||
document.getElementById('navbarLoggedIn').classList.add('d-none');
|
||||
document.getElementById('myProfileLink').href = '';
|
||||
}
|
||||
this._logged = state;
|
||||
}
|
||||
|
@ -25,7 +25,8 @@
|
||||
Me
|
||||
</a>
|
||||
<div class='dropdown-menu dropdown-menu-end position-absolute text-end px-2' style='min-width: 100px'>
|
||||
<a href="/me" class="dropdow-item nav-link" data-link>My Profile</a>
|
||||
<a id='myProfileLink' href='' class="dropdow-item nav-link" data-link>My Profile</a>
|
||||
<a href="/me" class="dropdow-item nav-link" data-link>Settings</a>
|
||||
<hr class='dropdown-separator my-auto'></hr>
|
||||
<a href="/logout" class="dropdow-item nav-link" data-link>Logout</a>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user