From 612f3037bbd639278eae82722de6b55235b708c9 Mon Sep 17 00:00:00 2001 From: Akis Date: Sun, 26 Feb 2023 08:41:21 +0200 Subject: [PATCH] arya moment --- src/routes/pubnix/+page.svelte | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/routes/pubnix/+page.svelte b/src/routes/pubnix/+page.svelte index 81b7e6b..7e18b7a 100644 --- a/src/routes/pubnix/+page.svelte +++ b/src/routes/pubnix/+page.svelte @@ -36,17 +36,8 @@

Online users

{#if !data.users.error} - {#if onlineUserCount == 1} -

There is {onlineUserCount} user online out of {userCount} users.

-
- {#each data.users.users as user} - {#if user.online} - - {/if} - {/each} -
- {:else if onlineUserCount > 1} -

There are {onlineUserCount} users online out of {userCount} users.

+ {#if data.users.users.some(isOnline)} +

There {onlineUserCount === 1 ? "is" : "are"} {onlineUserCount} {onlineUserCount === 1 ? "user" : "users"} online out of {userCount} users.

{#each data.users.users as user} {#if user.online} @@ -55,7 +46,7 @@ {/each}
{:else} -

No users online out of {userCount} users.

+

No users online

{/if} {:else}

{data.users.message}