adds public lists
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user