refactor: renamed a variable

This commit is contained in:
Huakun Shen 2025-01-12 01:30:13 -05:00
parent f6b70bade0
commit 80a854e432

View File

@ -11,19 +11,18 @@
} }
let { let {
class: className, class: className,
githubOwnerMismatch, ownershipCheckFailed,
versions, versions,
onPublish, onPublish,
publishedVersions publishedVersions
}: { }: {
class?: string class?: string
githubOwnerMismatch: boolean ownershipCheckFailed: boolean
versions: Version[] versions: Version[]
onPublish?: (version: Version) => void onPublish?: (version: Version) => void
publishedVersions: string[] publishedVersions: string[]
} = $props() } = $props()
</script> </script>
<Table.Root class={className}> <Table.Root class={className}>
<Table.Caption>All versions of the package</Table.Caption> <Table.Caption>All versions of the package</Table.Caption>
<Table.Header> <Table.Header>
@ -59,7 +58,7 @@
<Table.Cell class="text-center">{version.rekorLogId ? "✅" : "❌"}</Table.Cell> <Table.Cell class="text-center">{version.rekorLogId ? "✅" : "❌"}</Table.Cell>
<Table.Cell class="text-center"> <Table.Cell class="text-center">
{@const disabled = {@const disabled =
version.yanked || !version.rekorLogId || githubOwnerMismatch || isPublished} version.yanked || !version.rekorLogId || ownershipCheckFailed || isPublished}
{#if disabled} {#if disabled}
<HoverCard.Root> <HoverCard.Root>
<HoverCard.Trigger> <HoverCard.Trigger>
@ -70,7 +69,7 @@
Version is yanked Version is yanked
{:else if !version.rekorLogId} {:else if !version.rekorLogId}
Version is not signed by GitHub Action Version is not signed by GitHub Action
{:else if githubOwnerMismatch} {:else if ownershipCheckFailed}
Your GitHub account is not the owner of the package Your GitHub account is not the owner of the package
{:else if isPublished} {:else if isPublished}
Version is already published Version is already published