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
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Abschlussstatus",
|
||||
"confirm": "Bestätigen",
|
||||
"confirm-deletion": "Löschen bestätigen",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "Teilen bestätigen",
|
||||
"contribute": "Mitwirken",
|
||||
"copy-link": "Link kopieren",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "Link kopiert",
|
||||
"list": "{n, plural, =1 {Liste} other {Listen}}",
|
||||
"list-not-shared": "Mit niemandem geteilt",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "Liste gespeichert",
|
||||
"list-share-warning": "Durch das Teilen einer Liste werden automatisch alle darin enthaltenen Routen freigegeben.",
|
||||
"list-share-warning-update": "Hinzugefügte Routen werden mit allen geteilt, die Zugriff auf diese Liste haben.",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Completion Status",
|
||||
"confirm": "Confirm",
|
||||
"confirm-deletion": "Confirm Deletion",
|
||||
"confirm-publish": "Confirm publishing",
|
||||
"confirm-share": "Confirm share",
|
||||
"contribute": "Contribute",
|
||||
"copy-link": "Copy Link",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "Link copied!",
|
||||
"list": "{n, plural, =1 {List} other {Lists}}",
|
||||
"list-not-shared": "Not shared with anyone",
|
||||
"list-public-warning": "All trails in this list will become public.",
|
||||
"list-saved-successfully": "List saved successfully",
|
||||
"list-share-warning": "Sharing a list automatically shares all trails contained in it.",
|
||||
"list-share-warning-update": "Added trails will be shared with everyone that has access to this list.",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "L'état d'achèvement",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Contribuer",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {Liste} other {Listes}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Befejezés állapota",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Hozzájárulás",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {Lista} other {Listák}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Stato di completamento",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Contribuisci",
|
||||
"copy-link": "Copia link",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "Link copiato",
|
||||
"list": "{n, plural, =1 {Lista} other {Liste}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Voltooiingsstatus",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Bijdragen",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {Lijst} other {Lijsten}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Stan ukończenia",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Kontrybuuj",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {Lista} other {Listy}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "Status de conclusão",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "Contribuir",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {Lista} other {Listas}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"completion-status": "完成状态",
|
||||
"confirm": "",
|
||||
"confirm-deletion": "",
|
||||
"confirm-publish": "",
|
||||
"confirm-share": "",
|
||||
"contribute": "贡献",
|
||||
"copy-link": "",
|
||||
@@ -129,6 +130,7 @@
|
||||
"link-copied": "",
|
||||
"list": "{n, plural, =1 {列表} other {列表}}",
|
||||
"list-not-shared": "",
|
||||
"list-public-warning": "",
|
||||
"list-saved-successfully": "",
|
||||
"list-share-warning": "",
|
||||
"list-share-warning-update": "",
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { ListShare } from "./list_share";
|
||||
export class List {
|
||||
id?: string;
|
||||
name: string;
|
||||
public: boolean;
|
||||
description?: string;
|
||||
avatar?: string;
|
||||
trails?: string[];
|
||||
@@ -15,8 +16,9 @@ export class List {
|
||||
}
|
||||
author?: string;
|
||||
|
||||
constructor(name: string, trails: Trail[], params?: { description?: string, avatar?: string, author?: string }) {
|
||||
constructor(name: string, trails: Trail[], params?: { description?: string, public?: boolean, avatar?: string, author?: string }) {
|
||||
this.name = name;
|
||||
this.public = params?.public ?? false
|
||||
this.expand = { trails: trails };
|
||||
this.trails = trails.map(t => t.id!);
|
||||
this.description = params?.description;
|
||||
|
||||
Reference in New Issue
Block a user