Remove version numbers from pinned download dropdown

This commit is contained in:
Nassim Jahnke 2022-07-10 19:51:05 +02:00
parent 66ace3e391
commit 08e61a206e
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 5 additions and 3 deletions

View File

@ -22,6 +22,7 @@ const props = withDefaults(
defineProps<{
project: HangarProject;
small?: boolean;
showVersions?: boolean;
// Define either version and platform or pinnedVersion, or neither to use main channel versions
platform?: Platform;
version?: DownloadableVersion;
@ -29,6 +30,7 @@ const props = withDefaults(
}>(),
{
small: false,
showVersions: true,
}
);
@ -64,7 +66,7 @@ const external = computed(() => false);
>
<PlatformLogo :platform="platform" :size="24" class="mr-1" />
{{ backendData.platforms?.get(platform).name }}
<span class="ml-1">({{ formatVersionNumbers(v) }})</span>
<span v-if="showVersions" class="ml-1">({{ formatVersionNumbers(v) }})</span>
</DropdownItem>
</DropdownButton>
@ -92,7 +94,7 @@ const external = computed(() => false);
>
<PlatformLogo :platform="p" :size="24" class="mr-1" />
{{ backendData.platforms?.get(p).name }}
<span v-if="v.platformDependencies" class="ml-1">({{ formatVersionNumbers(v.platformDependencies[p]) }})</span>
<span v-if="v.platformDependencies && showVersions" class="ml-1">({{ formatVersionNumbers(v.platformDependencies[p]) }})</span>
</DropdownItem>
</DropdownButton>
</div>

View File

@ -122,7 +122,7 @@ useHead(useSeo(props.project.name, props.project.description, route, projectIcon
</div>
</router-link>
<div class="ml-1 space-y-2 flex flex-col">
<DownloadButton :project="project" :pinned-version="version" small class="self-end"></DownloadButton>
<DownloadButton :project="project" :pinned-version="version" small :show-versions="false" class="self-end"></DownloadButton>
</div>
</div>
</li>