mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-21 16:25:11 +02:00
feat: Request utils
This commit is contained in:
@@ -2,16 +2,32 @@
|
||||
import Container from '../../Container.svelte';
|
||||
import type { Readable } from 'svelte/store';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export let inactive: boolean = false;
|
||||
|
||||
let hasFoucus: Readable<boolean>;
|
||||
</script>
|
||||
|
||||
<Container
|
||||
bind:hasFocus={hasFoucus}
|
||||
class={classNames('selectable px-6 py-2 rounded-xl font-medium tracking-wide', {
|
||||
class={classNames('px-6 py-2 rounded-lg font-medium tracking-wide flex items-center', {
|
||||
'bg-stone-200 text-stone-900': $hasFoucus,
|
||||
'bg-stone-800 text-white': !$hasFoucus
|
||||
'hover:bg-stone-200 hover:text-stone-900': true,
|
||||
'bg-stone-800/50': !$hasFoucus,
|
||||
'cursor-pointer': !inactive,
|
||||
'cursor-not-allowed pointer-events-none opacity-40': inactive
|
||||
})}
|
||||
on:click
|
||||
>
|
||||
{#if $$slots.icon}
|
||||
<div class="mr-2">
|
||||
<slot name="icon" />
|
||||
</div>
|
||||
{/if}
|
||||
<slot />
|
||||
{#if $$slots['icon-after']}
|
||||
<div class="ml-2">
|
||||
<slot name="icon-after" />
|
||||
</div>
|
||||
{/if}
|
||||
</Container>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
setJellyfinItemWatched,
|
||||
type JellyfinItem
|
||||
} from '$lib/apis/jellyfin/jellyfinApi';
|
||||
import type { RadarrMovie } from '../../apis/radarr/radarrApi';
|
||||
import type { RadarrMovie } from '../../apis/radarr/radarr-api';
|
||||
import type { SonarrSeries } from '../../apis/sonarr/sonarrApi';
|
||||
import { jellyfinItemsStore } from '../../stores/data.store';
|
||||
import { settings } from '../../stores/settings.store';
|
||||
|
||||
0
src/lib/components/DetatchedPage.svelte
Normal file
0
src/lib/components/DetatchedPage.svelte
Normal file
@@ -40,7 +40,7 @@
|
||||
<Laptop class="w-8 h-8" slot="icon" />
|
||||
</div>
|
||||
</Container>
|
||||
<Container on:click={() => navigate('/movie/695721')}>
|
||||
<Container on:click={() => navigate('/movie/359410')}>
|
||||
<div class={itemContainer(1, $focusIndex)}>
|
||||
<CardStack class="w-8 h-8" slot="icon" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user