tweaks
This commit is contained in:
parent
56777c8230
commit
ab6b2d0057
3 changed files with 16 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ function Featured() {
|
|||
<div className="w-full p-1">
|
||||
<img alt="thumbnail" className="aspect-video h-full w-full rounded-md object-cover object-center" src={featuredPackage.data?.gallery[selectedImage].url} />
|
||||
</div>
|
||||
<div className="max-w-64 min-[1900px]:max-w-96 min-w-52 flex flex-col gap-y-1 p-4">
|
||||
<div className="lg:max-w-64 min-[1900px]:max-w-96 min-w-52 flex flex-col gap-y-1 p-4">
|
||||
<h2 className="text-[1.5rem] font-semibold">{featuredPackage.data?.name}</h2>
|
||||
|
||||
<Show when={false}>
|
||||
|
|
|
|||
|
|
@ -282,7 +282,8 @@ function InstallButton() {
|
|||
<Button
|
||||
className="max-w-full flex-1 rounded-r-none disabled:text-white/50 disabled:bg-blue-900"
|
||||
color="primary"
|
||||
isDisabled={!version || download.isPending || download.isSuccess}
|
||||
isDisabled={!version || download.isSuccess}
|
||||
isPending={download.isPending || versionsLoading}
|
||||
onClick={() => download.mutate()}
|
||||
>
|
||||
<Download01Icon />
|
||||
|
|
@ -298,7 +299,9 @@ function InstallButton() {
|
|||
</span>
|
||||
)
|
||||
: versionsLoading ? 'Looking for a version...' : 'No matching version found'
|
||||
: 'Select a Cluster'}
|
||||
: (clusters?.length ?? 0) > 0
|
||||
? 'Select a Cluster'
|
||||
: 'No clusters'}
|
||||
</Show>
|
||||
<Show when={download.isPending}>
|
||||
<span>
|
||||
|
|
@ -318,7 +321,12 @@ function InstallButton() {
|
|||
</div>
|
||||
</Button>
|
||||
|
||||
<Button className="w-8 h-full rounded-l-none border-l border-white/10 px-2" onClick={() => setOpen(true)}>
|
||||
<Button
|
||||
className="w-8 h-full rounded-l-none border-l border-white/10 px-2"
|
||||
isDisabled={clusters?.length === 0}
|
||||
isPending={clusters === undefined}
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
{open
|
||||
? <ChevronUpIcon />
|
||||
: <ChevronDownIcon />}
|
||||
|
|
|
|||
|
|
@ -129,3 +129,7 @@ export function formatAsDuration(seconds: number | bigint | Date): string {
|
|||
|
||||
return convertSeconds(seconds);
|
||||
}
|
||||
|
||||
export function includes<T, TArray extends T>(list: { includes: (arg0: TArray) => boolean }, element: T): element is TArray {
|
||||
return list.includes(element as unknown as TArray);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue