diff --git a/src/lib/components/Dialog/Dialog.svelte b/src/lib/components/Dialog/Dialog.svelte index d58b920..38e2009 100644 --- a/src/lib/components/Dialog/Dialog.svelte +++ b/src/lib/components/Dialog/Dialog.svelte @@ -3,6 +3,7 @@ import classNames from 'classnames'; import { fade } from 'svelte/transition'; import { modalStack } from '../Modal/modal.store'; + import Panel from '../Panel.svelte'; export let size: 'sm' | 'full' | 'lg' | 'dynamic' = 'sm'; @@ -16,20 +17,12 @@ class="h-full flex items-center justify-center bg-primary-900/75 py-20 px-32" transition:fade={{ duration: 100 }} on:click|self={() => handleClose()} + on:keypress={() => { + /* For a11y*/ + }} > -
+ -
+ diff --git a/src/lib/components/Dialog/EditProfileModal.svelte b/src/lib/components/Dialog/EditProfileModal.svelte index f45672e..82e490f 100644 --- a/src/lib/components/Dialog/EditProfileModal.svelte +++ b/src/lib/components/Dialog/EditProfileModal.svelte @@ -103,8 +103,8 @@ } - - + +

Edit Profile

name tab.set(Tabs.ProfilePictures)}> @@ -151,7 +151,7 @@ }} >

Select Profile Picture

- + setProfilePicture(profilePictures.ana)} diff --git a/src/lib/components/Integrations/JellyfinIntegrationUsersDialog.svelte b/src/lib/components/Integrations/JellyfinIntegrationUsersDialog.svelte index 94f4b74..f415e28 100644 --- a/src/lib/components/Integrations/JellyfinIntegrationUsersDialog.svelte +++ b/src/lib/components/Integrations/JellyfinIntegrationUsersDialog.svelte @@ -15,9 +15,15 @@ - {#each users as user} - handleSelect(user)}> - {user.Name} - - {/each} +

Users

+
+ {#each users as user} + handleSelect(user)} + > + {user.Name} + + {/each} +
diff --git a/src/lib/components/Panel.svelte b/src/lib/components/Panel.svelte new file mode 100644 index 0000000..5a823df --- /dev/null +++ b/src/lib/components/Panel.svelte @@ -0,0 +1,20 @@ + + +
+ +
diff --git a/src/lib/components/SelectItem.svelte b/src/lib/components/SelectItem.svelte index dc49be2..dca7559 100644 --- a/src/lib/components/SelectItem.svelte +++ b/src/lib/components/SelectItem.svelte @@ -7,7 +7,7 @@ ; + export let size: 'hug' | 'stretch' = 'hug'; let selectable: Selectable; @@ -33,19 +34,24 @@ = index, - 'translate-x-10': !active && $openTab < index - } - )} + class={classNames('col-start-1 col-end-1 row-start-1 row-end-1', { + 'absolute pointer-events-none left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2': + !active && size === 'hug', + 'absolute pointer-events-none inset-0': !active && size === 'stretch', + '': active + })} bind:selectable on:back on:navigate={handleNavigate} disabled={!active} > - +
= index, + 'translate-x-10': !active && $openTab < index + })} + > + +
diff --git a/src/lib/components/Tab/Tab.ts b/src/lib/components/Tab/Tab.ts index 808bbb9..da11b40 100644 --- a/src/lib/components/Tab/Tab.ts +++ b/src/lib/components/Tab/Tab.ts @@ -1,10 +1,12 @@ import { writable } from 'svelte/store'; +import type { ComponentProps } from 'svelte'; +import Tab from './Tab.svelte'; -export function useTabs(defaultTab: number) { +export function useTabs(defaultTab: number, props: Pick, 'size'> = {}) { const openTab = writable(defaultTab); const next = () => openTab.update((n) => n + 1); const previous = () => openTab.update((n) => n - 1); - return { subscribe: openTab.subscribe, openTab, set: openTab.set, next, previous }; + return { subscribe: openTab.subscribe, openTab, set: openTab.set, next, previous, ...props }; } diff --git a/src/lib/pages/ManagePage.svelte b/src/lib/pages/ManagePage.svelte index 8bb72f8..0ee5217 100644 --- a/src/lib/pages/ManagePage.svelte +++ b/src/lib/pages/ManagePage.svelte @@ -29,7 +29,7 @@ About } - const tab = useTabs(Tabs.Account); + const tab = useTabs(Tabs.Interface, { size: 'stretch' }); let jellyfinBaseUrl = ''; let jellyfinApiKey = ''; @@ -133,7 +133,7 @@ }} /> - + - - + +
- -
-
- -

Welcome to Reiverr

-
- Looks like this is a new account. This setup will get you started with connecting your - services to get most out of Reiverr. -
- - -
- -
-
-
- - -

Connect a TMDB Account

-
- Connect to TMDB for personalized recommendations based on your movie reviews and - preferences. -
- -
- {#await connectedTmdbAccount then account} - {#if account} - { - tab.set(Tabs.TmdbConnect); - handleGenerateTMDBLink(); - }}>Logged in as - {:else} - - {/if} - {/await} - + + + detail.stopPropagation()}> +

Welcome to Reiverr

+
+ Looks like this is a new account. This setup will get you started with connecting your + services to get most out of Reiverr. +
+ + +
-
+
+ - tab.set(Tabs.Tmdb)}> -

Connect a TMDB Account

-
- To connect your TMDB account, log in via the link below and then click "Complete - Connection". -
+ +

Connect a TMDB Account

+
+ Connect to TMDB for personalized recommendations based on your movie reviews and + preferences. +
- {#if tmdbConnectQrCode} -
- {/if} - - - {#if !tmdbConnectRequestToken} - - {:else if tmdbConnectLink} - - - {/if} - - - - -

Connect to Jellyfin

-
Connect to Jellyfin to watch movies and tv shows.
- -
- !!u?.length)}> - Base Url - - !!u?.length)}> - API Key - -
- - {#await jellyfinUsers then users} - {#if users.length} +
+ {#await connectedTmdbAccount then account} + {#if account} tab.set(Tabs.SelectUser)} - > - User - - {/if} - {/await} - - {#if jellyfinError} -
{jellyfinError}
- {/if} - - - - {#if jellyfinBaseUrl && jellyfinApiKey && jellyfinUser} - - {:else} - - {/if} - - - tab.set(Tabs.Jellyfin)}> -

Select User

- {#await jellyfinUsers then users} - {#each users as user} - { - jellyfinUser = user; - tab.set(Tabs.Jellyfin); + tab.set(Tabs.TmdbConnect); + handleGenerateTMDBLink(); + }}>Logged in as + {:else} + + {/if} {/await} -
- -

Connect to Sonarr

-
Connect to Sonarr for requesting and managing tv shows.
- -
- Base Url - API Key -
- - {#if sonarrError} -
{sonarrError}
- {/if} - - - - {#if sonarrBaseUrl && sonarrApiKey} - + + Skip {/if} - -
+ + +
+
- -

Connect to Radarr

-
Connect to Radarr for requesting and managing movies.
+ { + tab.set(Tabs.Tmdb); + detail.stopPropagation(); + }} + > +

Connect a TMDB Account

+
+ To connect your TMDB account, log in via the link below and then click "Complete + Connection". +
-
- Base Url - API Key -
+ {#if tmdbConnectQrCode} +
+ {/if} - {#if radarrError} -
{radarrError}
+ + {#if !tmdbConnectRequestToken} + + {:else if tmdbConnectLink} + + {/if} + + - - - {#if radarrBaseUrl && radarrApiKey} - - {:else} - - {/if} - - + +

Connect to Jellyfin

+
Connect to Jellyfin to watch movies and tv shows.
- -
- -
-

All Set!

-
Reiverr is now ready to use.
+
+ !!u?.length)}> + Base Url + + !!u?.length)}> + API Key + +
- - tab.set(Tabs.SelectUser)} > -
- -
-
-
-
-
+ User + + {/if} + {/await} + + {#if jellyfinError} +
{jellyfinError}
+ {/if} + + + + {#if jellyfinBaseUrl && jellyfinApiKey && jellyfinUser} + + {:else} + + {/if} + +
+ { + tab.set(Tabs.Jellyfin); + detail.stopPropagation(); + }} + > +

Select User

+
+ {#await jellyfinUsers then users} + {#each users as user} + { + jellyfinUser = user; + tab.set(Tabs.Jellyfin); + }} + > + {user.Name} + + {/each} + {/await} + + + +

Connect to Sonarr

+
Connect to Sonarr for requesting and managing tv shows.
+ +
+ Base Url + API Key +
+ + {#if sonarrError} +
{sonarrError}
+ {/if} + + + + {#if sonarrBaseUrl && sonarrApiKey} + + {:else} + + {/if} + +
+ + +

Connect to Radarr

+
Connect to Radarr for requesting and managing movies.
+ +
+ Base Url + API Key +
+ + {#if radarrError} +
{radarrError}
+ {/if} + + + + {#if radarrBaseUrl && radarrApiKey} + + {:else} + + {/if} + +
+ + +
+ +
+

All Set!

+
Reiverr is now ready to use.
+ + + +
+ +
+
+
+