Commit 7c2de36b5f
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/extrepo/SiteCell.vue +2 −2
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <script setup lang="ts"> |
| 2 | 2 | import { langFlagClass, ratingIcon, ratingTitle } from './helpers' |
| 3 | import { hasCopyButton } from './install' | |
| 3 | import { hasSiteCopyButton } from './install' | |
| 4 | 4 | import LazyIcon from './LazyIcon.vue' |
| 5 | 5 | import type { RepoSite } from './types' |
| 6 | 6 | import { useCopy } from './useCopy' |
| @@ -70,7 +70,7 @@ async function copyInstallUrl() { | ||
| 70 | 70 | <span class="i-lucide:download" /> |
| 71 | 71 | </a> |
| 72 | 72 | <button |
| 73 | v-if="site.installUrl && hasCopyButton(scheme ?? '')" | |
| 73 | v-if="site.installUrl && hasSiteCopyButton(scheme ?? '')" | |
| 74 | 74 | class="ext-site-copy-btn" |
| 75 | 75 | type="button" |
| 76 | 76 | :aria-label="`Copy ${site.name} url`" |
docs/.vitepress/theme/components/extrepo/install.ts +7
| @@ -54,6 +54,9 @@ const BROWSE_ONLY_SCHEMES = new Set(['kotatsu', 'echo']) | ||
| 54 | 54 | |
| 55 | 55 | const NO_COPY_SCHEMES = new Set(['suwatte', 'echo']) |
| 56 | 56 | |
| 57 | // Schemes where the per-site action is install-only. | |
| 58 | const NO_SITE_COPY_SCHEMES = new Set(['mana']) | |
| 59 | ||
| 57 | 60 | export function isBrowseOnly(scheme: string): boolean { |
| 58 | 61 | return BROWSE_ONLY_SCHEMES.has(scheme) |
| 59 | 62 | } |
| @@ -62,6 +65,10 @@ export function hasCopyButton(scheme: string): boolean { | ||
| 62 | 65 | return !NO_COPY_SCHEMES.has(scheme) |
| 63 | 66 | } |
| 64 | 67 | |
| 68 | export function hasSiteCopyButton(scheme: string): boolean { | |
| 69 | return hasCopyButton(scheme) && !NO_SITE_COPY_SCHEMES.has(scheme) | |
| 70 | } | |
| 71 | ||
| 65 | 72 | export function installHref( |
| 66 | 73 | scheme: string, |
| 67 | 74 | repo: Repo, |