From b77b87c98aee9a139e33bff51872381ea2ab4f02 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Wed, 25 Dec 2024 18:22:48 +0700 Subject: [PATCH] fix: combine presence avatars Signed-off-by: Alexander Onnikov --- dev/prod/public/config-dev.json | 3 +- .../src/components/PresenceAvatars.svelte | 36 +++++++++---------- .../src/components/PresenceList.svelte | 35 ++++++++++++++++++ 3 files changed, 54 insertions(+), 20 deletions(-) create mode 100644 plugins/presence-resources/src/components/PresenceList.svelte diff --git a/dev/prod/public/config-dev.json b/dev/prod/public/config-dev.json index 8f0b1e22f26..2093d02ddc1 100644 --- a/dev/prod/public/config-dev.json +++ b/dev/prod/public/config-dev.json @@ -7,5 +7,6 @@ "CALENDAR_URL": "https://calendar.hc.engineering", "REKONI_URL": "https://rekoni.hc.engineering", "COLLABORATOR_URL": "wss://collaborator.hc.engineering", - "STATS_URL": "https://stats.hc.engineering" + "STATS_URL": "https://stats.hc.engineering", + "PRESENCE_URL": "wss://presence.hc.engineering" } \ No newline at end of file diff --git a/plugins/presence-resources/src/components/PresenceAvatars.svelte b/plugins/presence-resources/src/components/PresenceAvatars.svelte index 4708b5e0792..efbb8c5e8ff 100644 --- a/plugins/presence-resources/src/components/PresenceAvatars.svelte +++ b/plugins/presence-resources/src/components/PresenceAvatars.svelte @@ -15,36 +15,34 @@ {#if items.length > 0} - {#if combine} - - {:else} -
- {#each items as item} - {@const person = $personByIdStore.get(item)} - {#if person} -
- -
- {/if} - {/each} -
- {/if} +
+ {#each items as item, i} + {@const person = $personByIdStore.get(item)} +
+ +
+ {/each} +
{/if} diff --git a/plugins/presence-resources/src/components/PresenceList.svelte b/plugins/presence-resources/src/components/PresenceList.svelte new file mode 100644 index 00000000000..3456785373b --- /dev/null +++ b/plugins/presence-resources/src/components/PresenceList.svelte @@ -0,0 +1,35 @@ + + + + + {#each items as item} + {@const person = $personByIdStore.get(item)} +
+
+ +
+ {formatName(person.name)} +
+ {/each} +