Skip to content

Commit

Permalink
Truncate username in lobby page
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirRezaM75 committed Feb 11, 2024
1 parent 92f23ce commit 4716045
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```
docker run -it --rm --name node -v $(pwd):/app -w /app node:18-alpine npm run build
```
```
8 changes: 5 additions & 3 deletions client/src/routes/lobbies/[lobbyId]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
on:click={() => openAvatarModal(player.id)}
class="relative bg-slate-900 p-6 rounded-lg text-center border border-slate-900
class="w-40 relative bg-slate-900 py-6 px-4 rounded-lg text-center border border-slate-900
{player.id === data.auth.id ? 'cursor-pointer hover:border-lime-primary' : ''}"
>
{#if data.auth.id === player.id}
Expand All @@ -157,11 +157,13 @@
</div>
{/if}
<div
class="mb-3 rounded-full w-24 h-24 bg-top bg-no-repeat"
class="mx-auto mb-3 rounded-full w-24 h-24 bg-top bg-no-repeat"
style="background-image: url({`/images/avatars/${player.avatarId + 1}.jpg`});
background-size: 110px"
/>
<span class="text-gray-300 font-bold text-lg uppercase">{player.username}</span>
<p class="w-full truncate text-gray-300 font-bold text-lg uppercase">
{player.username}
</p>
</div>
{/each}
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/src/services/GameService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class GameService {
this.startBidding({
endsAt: content.expirationTime,
state: content.state,
starterPlayerId: "",
starterPlayerId: ''
});

const player = content.players.find((player) => player.id === this.authId);
Expand Down

0 comments on commit 4716045

Please sign in to comment.