mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-26 18:55:44 +02:00
display checkbox conditionally
This commit is contained in:
@@ -104,6 +104,8 @@ export interface Show {
|
||||
seasons: Season[]; // items: { $ref: #/components/schemas/Season }, type: array
|
||||
id: string; // type: string, format: uuid
|
||||
continuous_download: boolean;
|
||||
ended: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface PublicShow {
|
||||
@@ -115,6 +117,7 @@ export interface PublicShow {
|
||||
seasons: PublicSeason[]; // items: { $ref: #/components/schemas/Season }, type: array
|
||||
id: string; // type: string, format: uuid
|
||||
continuous_download: boolean;
|
||||
ended: boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -94,20 +94,22 @@
|
||||
class="w-full md:w-1/3 flex-auto rounded-xl bg-muted/50 p-4"
|
||||
>
|
||||
{#if user().is_superuser}
|
||||
<div class="my-2 mx-1 block">
|
||||
<Checkbox
|
||||
checked={show().continuous_download}
|
||||
onCheckedChange={() => {
|
||||
{#if !show().ended}
|
||||
<div class="my-2 mx-1 block">
|
||||
<Checkbox
|
||||
checked={show().continuous_download}
|
||||
onCheckedChange={() => {
|
||||
toggle_continuous_download()
|
||||
}}
|
||||
id="continuous-download-checkbox"
|
||||
id="continuous-download-checkbox"
|
||||
|
||||
/>
|
||||
<Label for="continuous-download-checkbox">
|
||||
Enable automatic download of future seasons
|
||||
</Label>
|
||||
<hr>
|
||||
</div>
|
||||
/>
|
||||
<Label for="continuous-download-checkbox">
|
||||
Enable automatic download of future seasons
|
||||
</Label>
|
||||
<hr>
|
||||
</div>
|
||||
{/if}
|
||||
<DownloadSeasonDialog show={show()}/>
|
||||
{/if}
|
||||
<RequestSeasonDialog show={show()}/>
|
||||
|
||||
Reference in New Issue
Block a user