fix(messaging): add dividers between topics in topics modal

This commit is contained in:
Steven Nguyen
2024-02-20 16:16:55 -08:00
parent ccfe6b91d4
commit 041ec1fae1
@@ -1,6 +1,7 @@
<script lang="ts">
import { EmptySearch, Modal, PaginationInline } from '$lib/components';
import { Button, FormList, InputCheckbox, InputSearch } from '$lib/elements/forms';
import { Table, TableBody, TableCell, TableRow } from '$lib/elements/table';
import { sdk } from '$lib/stores/sdk';
import { Query, type Models } from '@appwrite.io/console';
import { createEventDispatcher } from 'svelte';
@@ -91,25 +92,33 @@
bind:value={search} />
{#if Object.keys(topicResultsById).length > 0}
<FormList>
{#each Object.entries(topicResultsById) as [topicId, topic]}
<InputCheckbox
id={topicId}
disabled={!!topicsById[topicId]}
checked={!!selected[topicId]}
on:change={(event) => onTopicSelection(event, topic)}>
<svelte:fragment slot="description">
<span class="title">
<span class="u-line-height-1-5">
<span class="body-text-2 u-bold" data-private>
{topic.name}
</span>
<span class="collapsible-button-optional">
({getTotal(topic)} subscribers)
</span>
</span></span>
</svelte:fragment>
</InputCheckbox>
{/each}
<Table noMargin noStyles>
<TableBody>
{#each Object.entries(topicResultsById) as [topicId, topic]}
<TableRow>
<TableCell>
<InputCheckbox
id={topicId}
disabled={!!topicsById[topicId]}
checked={!!selected[topicId]}
on:change={(event) => onTopicSelection(event, topic)}>
<svelte:fragment slot="description">
<span class="title">
<span class="u-line-height-1-5">
<span class="body-text-2 u-bold" data-private>
{topic.name}
</span>
<span class="collapsible-button-optional">
({getTotal(topic)} subscribers)
</span>
</span></span>
</svelte:fragment>
</InputCheckbox>
</TableCell>
</TableRow>
{/each}
</TableBody>
</Table>
</FormList>
<div class="u-flex u-main-space-between">
<p class="text">Total results: {totalResults}</p>