initial profile implementation!

This commit is contained in:
ari melody 2025-07-14 00:19:42 +01:00
parent 667b11f2f4
commit 449a11ee55
Signed by: ari
GPG key ID: CF99829C92678188
14 changed files with 212 additions and 57 deletions

View file

@ -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>