diff --git a/src/lib/components/AddToListMenu.svelte b/src/lib/components/AddToListMenu.svelte new file mode 100644 index 0000000..09bbe98 --- /dev/null +++ b/src/lib/components/AddToListMenu.svelte @@ -0,0 +1,220 @@ + + + + + + Add to list + + + + + + + add to list + + + {#if loading} +
+ + loading lists… +
+ {:else if lists.length > 0} +
+ {#each lists as list (list.uri)} + void toggleList(list, checked)} + closeOnSelect={false} + disabled={pendingUris.includes(list.uri)} + textValue={list.name} + class="flex min-h-9 items-center gap-3 rounded-lg px-2.5 py-2 text-sm outline-none select-none data-disabled:opacity-50 data-highlighted:bg-white/10" + > + {#snippet children({ checked })} + {list.name} + + {#if pendingUris.includes(list.uri)} + + {:else if checked} + + {/if} + + {/snippet} + + {/each} +
+ {:else if !listError} +
No lists yet.
+ {/if} +
+ + {#if listError} + + {/if} + + + + + new list + +
+
+
diff --git a/src/lib/components/CreateListDialog.svelte b/src/lib/components/CreateListDialog.svelte new file mode 100644 index 0000000..dd0f499 --- /dev/null +++ b/src/lib/components/CreateListDialog.svelte @@ -0,0 +1,145 @@ + + + !open && createListDialog.hide()} +> + + + + new list + + Create a list and add this movie or TV show to it. + + + + + + {#if createListDialog.item} +
+
+ {#if createListDialog.item.poster} + Poster for {createListDialog.item.title} + {/if} +
+
+
{createListDialog.item.title}
+
+ {createListDialog.item.creativeWorkType === 'tv_show' ? 'TV series' : 'Movie'} +
+
+
+ +
+ + + + + + + {#if listError} + + {/if} + + +
+ {/if} +
+
+
diff --git a/src/lib/components/ItemPage.svelte b/src/lib/components/ItemPage.svelte index bca9959..25ededa 100644 --- a/src/lib/components/ItemPage.svelte +++ b/src/lib/components/ItemPage.svelte @@ -1,6 +1,7 @@ @@ -18,3 +19,4 @@ + \ No newline at end of file diff --git a/src/routes/profile/[actor]/+page.svelte b/src/routes/profile/[actor]/+page.svelte index d917139..684df1f 100644 --- a/src/routes/profile/[actor]/+page.svelte +++ b/src/routes/profile/[actor]/+page.svelte @@ -124,7 +124,7 @@ class={`text-sm text-white ${writtenReviews.length > 0 || ratings.length > 0 ? 'mt-10 border-t border-white/10 pt-6' : 'mt-6'}`} >

Lists

-
+
{#each data.lists as list (list.uri)} {/each}