mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2025-12-23 22:18:19 -05:00
only start searching for torrents when clicking on search button
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
let { movie } = $props();
|
||||
let dialogueState = $state(false);
|
||||
let torrentsPromise: any = $state();
|
||||
let torrentsPromise: any = $state(null);
|
||||
let tabState: string = $state('basic');
|
||||
let isLoading: boolean = $state(false);
|
||||
let advancedMode: boolean = $derived(tabState === 'advanced');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open={dialogueState} onOpenChange={() => (dialogueState ? search() : null)}>
|
||||
<Dialog.Root bind:open={dialogueState}>
|
||||
<Dialog.Trigger class={buttonVariants({ variant: 'default' })}>Download Movie</Dialog.Trigger>
|
||||
<Dialog.Content class="max-h-[90vh] w-fit min-w-[80vw] overflow-y-auto">
|
||||
<Dialog.Header>
|
||||
@@ -168,9 +168,17 @@
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
{:else}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">No torrents found.</div>
|
||||
</Table.Cell>
|
||||
{#if data === null}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">
|
||||
Start searching by clicking the search button!
|
||||
</div>
|
||||
</Table.Cell>
|
||||
{:else}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">No torrents found.</div>
|
||||
</Table.Cell>
|
||||
{/if}
|
||||
{/each}
|
||||
</Table.Body>
|
||||
</Table.Root>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open={dialogueState} onOpenChange={() => (dialogueState ? search() : null)}>
|
||||
<Dialog.Root bind:open={dialogueState}>
|
||||
<Dialog.Trigger class={buttonVariants({ variant: 'default' })}>Download Seasons</Dialog.Trigger>
|
||||
<Dialog.Content class="max-h-[90vh] w-fit min-w-[80vw] overflow-y-auto">
|
||||
<Dialog.Header>
|
||||
@@ -202,9 +202,17 @@
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
{:else}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">No torrents found.</div>
|
||||
</Table.Cell>
|
||||
{#if data === null}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">
|
||||
Start searching by clicking the search button!
|
||||
</div>
|
||||
</Table.Cell>
|
||||
{:else}
|
||||
<Table.Cell colspan={7}>
|
||||
<div class="font-light text-center w-full">No torrents found.</div>
|
||||
</Table.Cell>
|
||||
{/if}
|
||||
{/each}
|
||||
</Table.Body>
|
||||
</Table.Root>
|
||||
|
||||
Reference in New Issue
Block a user