mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-22 16:55:13 +02:00
feat: Add context button with "open in" links in title pages & modals
This commit is contained in:
17
src/lib/components/TitlePageLayout/OpenInButton.svelte
Normal file
17
src/lib/components/TitlePageLayout/OpenInButton.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import type { LibraryItemStore } from '$lib/stores/library.store';
|
||||
import type { TitleType } from '$lib/types';
|
||||
import ContextMenuButton from '../ContextMenu/ContextMenuButton.svelte';
|
||||
import LibraryItemContextItems from '../ContextMenu/LibraryItemContextItems.svelte';
|
||||
|
||||
export let title = '';
|
||||
export let itemStore: LibraryItemStore;
|
||||
export let type: TitleType;
|
||||
export let tmdbId: number;
|
||||
</script>
|
||||
|
||||
<ContextMenuButton heading={$itemStore.loading ? 'Loading...' : title}>
|
||||
<svelte:fragment slot="menu">
|
||||
<LibraryItemContextItems {itemStore} {type} {tmdbId} />
|
||||
</svelte:fragment>
|
||||
</ContextMenuButton>
|
||||
@@ -67,7 +67,7 @@
|
||||
})}
|
||||
>
|
||||
<div
|
||||
class={classNames('flex-1 relative flex pt-24 px-4 sm:px-8 pb-6', {
|
||||
class={classNames('flex-1 relative flex pt-24 px-2 sm:px-4 lg:px-8 pb-6', {
|
||||
'min-h-[60vh]': isModal
|
||||
})}
|
||||
bind:clientHeight={topHeight}
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
class={classNames('flex flex-col gap-6 bg-stone-950 px-2 sm:px-4 lg:px-8 pb-6 relative z-[1]', {
|
||||
class={classNames('flex flex-col gap-6 bg-stone-950 px-2 sm:px-4 lg:px-8 pb-6 relative', {
|
||||
'2xl:px-0': !isModal
|
||||
})}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user