forked from blisstown/campfire
initial profile implementation!
This commit is contained in:
parent
667b11f2f4
commit
449a11ee55
14 changed files with 212 additions and 57 deletions
|
@ -61,6 +61,16 @@
|
|||
goto(route);
|
||||
}
|
||||
|
||||
function gotoProfile() {
|
||||
if (!$account) return;
|
||||
playSound();
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth"
|
||||
});
|
||||
goto(`/${$server.host}/${$account.username}`);
|
||||
}
|
||||
|
||||
async function log_out() {
|
||||
if (!confirm("This will log you out. Are you sure?")) return;
|
||||
|
||||
|
@ -171,9 +181,9 @@
|
|||
</div>
|
||||
|
||||
<div id="account-button">
|
||||
<img src={$account.avatar_url} class="account-avatar" height="64px" alt="" aria-hidden="true" on:click={() => playSound()}>
|
||||
<img src={$account.avatar_url} class="account-avatar" height="64px" alt="" aria-hidden="true" on:click={() => gotoProfile()}>
|
||||
<div class="account-name" aria-hidden="true">
|
||||
<a href={$account.url} class="nickname" title={$account.nickname}>{@html $account.rich_name}</a>
|
||||
<a href="/{$server.host}/{$account.username}" class="nickname" title={$account.nickname}>{@html $account.rich_name}</a>
|
||||
<span class="username" title={`@${$account.username}@${$account.host}`}>
|
||||
{$account.fqn}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue