feat(dashboard): allow selecting which avatar to show in list

This commit is contained in:
Jake Fulmine 2023-09-21 13:23:44 +02:00
parent 94e848ee4c
commit 1777070694
14 changed files with 120 additions and 24 deletions

View file

@ -165,7 +165,7 @@
{:else if group && group.id}
<Card class="mb-4">
<CardHeader>
<CardsHeader item={group}>
<CardsHeader item={group} type="group" avatarUsed="avatar">
<div slot="icon" style="cursor: pointer;" id={`group-copy-${group.id}`} on:click|stopPropagation={() => copyShortLink()} on:keydown={(e) => copyShortLink(e)} tabindex={0} >
<FaUsers slot="icon" />
</div>
@ -186,13 +186,13 @@
<span class="itemcounter">{processedList.length} {pageOptions.type}s ({currentPage.length} shown)</span>
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{#if pageOptions.view === "card"}
<CardView {pageOptions} currentList={currentPage} />
<CardView {pageOptions} currentList={currentPage} {listOptions} />
{:else if pageOptions.view === "tiny"}
<TinyView {pageOptions} currentList={currentPage} />
<TinyView {pageOptions} currentList={currentPage} {listOptions} />
{:else if pageOptions.view === "text"}
<TextView {pageOptions} currentList={currentPage} {listOptions} />
{:else}
<ListView {pageOptions} currentList={currentPage} fullListLength={groupMembers.length}/>
<ListView {pageOptions} currentList={currentPage} fullListLength={groupMembers.length} options={listOptions}/>
{/if}
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{/if}

View file

@ -167,7 +167,7 @@
{:else if member && member.id}
<Card class="mb-4">
<CardHeader>
<CardsHeader item={member}>
<CardsHeader item={member} avatarUsed="avatar" type="member">
<div slot="icon" style="cursor: pointer;" id={`member-copy-${member.id}`} on:click|stopPropagation={() => copyShortLink()} on:keydown={(e) => copyShortLink(e)} tabindex={0} >
<FaAddressCard slot="icon" />
</div>
@ -188,13 +188,13 @@
<span class="itemcounter">{processedList.length} {pageOptions.type}s ({currentPage.length} shown)</span>
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{#if pageOptions.view === "card"}
<CardView {pageOptions} currentList={currentPage} />
<CardView {pageOptions} currentList={currentPage} {listOptions} />
{:else if pageOptions.view === "tiny"}
<TinyView {pageOptions} currentList={currentPage} />
<TinyView {pageOptions} currentList={currentPage} {listOptions} />
{:else if pageOptions.view === "text"}
<TextView {pageOptions} currentList={currentPage} {listOptions} />
{:else}
<ListView {pageOptions} currentList={currentPage} fullListLength={memberGroups.length}/>
<ListView {pageOptions} currentList={currentPage} fullListLength={memberGroups.length} options={listOptions} />
{/if}
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{/if}