mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-12 03:37:27 +08:00
feat: add additional information on user home
adds display name (if available), moves game name (if display name is visible) and shows username (if available)
This commit is contained in:
@@ -122,9 +122,22 @@
|
|||||||
<img use:pfp={d.user.aquaUser} alt="" class="pfp" on:error={pfpNotFound}>
|
<img use:pfp={d.user.aquaUser} alt="" class="pfp" on:error={pfpNotFound}>
|
||||||
<div class="name-box">
|
<div class="name-box">
|
||||||
<div class="name-left">
|
<div class="name-left">
|
||||||
<h2>{d.user.name}</h2>
|
|
||||||
{#if d.user.aquaUser}
|
{#if d.user.aquaUser}
|
||||||
|
{#if d.user.aquaUser.displayName}
|
||||||
|
<h2>{d.user.aquaUser?.displayName}</h2>
|
||||||
|
{:else}
|
||||||
|
<h2>{d.user.name}</h2>
|
||||||
|
{/if}
|
||||||
|
<div class="game-name">
|
||||||
|
{#if d.user.aquaUser.displayName}
|
||||||
|
{d.user.name}
|
||||||
|
{/if}
|
||||||
|
(@{d.user.aquaUser.username})
|
||||||
|
</div>
|
||||||
<div class="country">{countryCodeToEmoji(d.user.aquaUser?.country)}</div>
|
<div class="country">{countryCodeToEmoji(d.user.aquaUser?.country)}</div>
|
||||||
|
{:else}
|
||||||
|
<h2>{d.user.name}</h2>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if typeof d.user.rival === 'boolean' && game === 'mai2'}
|
{#if typeof d.user.rival === 'boolean' && game === 'mai2'}
|
||||||
@@ -378,6 +391,16 @@
|
|||||||
.name-left
|
.name-left
|
||||||
display: flex
|
display: flex
|
||||||
gap: 1em
|
gap: 1em
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
.game-name
|
||||||
|
position: absolute
|
||||||
|
left: 0.5em
|
||||||
|
bottom: 0
|
||||||
|
transform: translate(0, 75%)
|
||||||
|
opacity: 50%
|
||||||
|
white-space: nowrap
|
||||||
|
max-width: 50%
|
||||||
|
|
||||||
.pfp
|
.pfp
|
||||||
width: 100px
|
width: 100px
|
||||||
|
|||||||
Reference in New Issue
Block a user