arya moment

This commit is contained in:
Akis 2023-02-26 08:41:21 +02:00
parent eda5adf19b
commit 612f3037bb
Signed by untrusted user: akis
GPG Key ID: 267BF5C6677944ED

View File

@ -36,17 +36,8 @@
<h2>Online users</h2> <h2>Online users</h2>
{#if !data.users.error} {#if !data.users.error}
{#if onlineUserCount == 1} {#if data.users.users.some(isOnline)}
<p class="my-4">There is {onlineUserCount} user online out of {userCount} users.</p> <p class="my-4">There {onlineUserCount === 1 ? "is" : "are"} {onlineUserCount} {onlineUserCount === 1 ? "user" : "users"} online out of {userCount} users.</p>
<div class="flex flex-row flex-wrap gap-4">
{#each data.users.users as user}
{#if user.online}
<User {user} />
{/if}
{/each}
</div>
{:else if onlineUserCount > 1}
<p class="my-4">There are {onlineUserCount} users online out of {userCount} users.</p>
<div class="flex flex-row flex-wrap gap-4"> <div class="flex flex-row flex-wrap gap-4">
{#each data.users.users as user} {#each data.users.users as user}
{#if user.online} {#if user.online}
@ -55,7 +46,7 @@
{/each} {/each}
</div> </div>
{:else} {:else}
<p>No users online out of {userCount} users.</p> <p>No users online</p>
{/if} {/if}
{:else} {:else}
<p>{data.users.message}</p> <p>{data.users.message}</p>