adds public lists

This commit is contained in:
Christian Beutel
2024-12-08 21:30:55 +01:00
parent 254e053bd9
commit 673eb78dd0
15 changed files with 200 additions and 59 deletions

View File

@@ -9,6 +9,7 @@
export let title: string = $_('confirm-deletion');
export let text: string;
export let action: string = "delete";
export let id: string = "confirm-modal";
const dispatch = createEventDispatcher();
@@ -18,13 +19,13 @@
}
</script>
<Modal id="confirm-modal" {title} bind:openModal bind:closeModal>
<Modal {id} {title} bind:openModal bind:closeModal>
<p slot="content">{text}</p>
<div slot="footer" class="flex items-center gap-4">
<button class="btn-secondary" on:click={closeModal}
>{$_("cancel")}</button
>
<button class="btn-danger" type="button" on:click={confirm} name="delete"
<button class={action === "delete" ? "btn-delete" : "btn-primary"} type="button" on:click={confirm} name="delete"
>{$_(action)}</button
>
</div></Modal

View File

@@ -58,6 +58,14 @@
>
{list.name}
</h5>
{#if list.public}
<span
class="tooltip"
data-title={$_("public")}
>
<i class="fa fa-globe"></i>
</span>
{/if}
{#if listIsShared}
<ShareInfo type="list" subject={list}></ShareInfo>
{/if}

View File

@@ -72,14 +72,26 @@
</script>
<div class="relative">
{#if listIsShared}
{#if (list.public || listIsShared) && $currentUser}
<div
class="absolute top-8 right-8 bg-white text-primary rounded-full w-8 py-1 text-center"
class="flex absolute top-4 right-6 {list.public && listIsShared
? 'w-16'
: 'w-8'} h-8 rounded-full items-center justify-center bg-white text-primary"
>
<ShareInfo type="list" subject={list}></ShareInfo>
{#if list.public}
<span
class="tooltip"
class:mr-3={list.public && listIsShared}
data-title={$_("public")}
>
<i class="fa fa-globe"></i>
</span>
{/if}
{#if listIsShared}
<ShareInfo type="list" subject={list}></ShareInfo>
{/if}
</div>
{/if}
{#if dropdownItems.length}
<div class="absolute bottom-8 right-8">
<Dropdown