feat: add download metadata to website (#6034)

* feat: add download metadata to website

* add to project cards
This commit is contained in:
Prospector
2026-05-07 19:20:54 -07:00
committed by GitHub
parent fd5d2797b3
commit 3d7aea5a45
13 changed files with 335 additions and 30 deletions
+7 -1
View File
@@ -1,8 +1,12 @@
import type { Labrinth } from '@modrinth/api-client'
import type { Ref } from 'vue'
import type { DeepReadonly, Ref } from 'vue'
import { createContext } from '.'
export const PROJECT_DEP_MARKER_QUERY = { dep: '1' } as const
export type CdnDownloadReason = 'standalone' | 'dependency'
export interface ProjectPageContext {
// Data refs
projectV2: Ref<Labrinth.Projects.v2.Project>
@@ -17,6 +21,8 @@ export interface ProjectPageContext {
dependencies: Ref<Labrinth.Projects.v2.DependencyInfo | null>
dependenciesLoading: Ref<boolean>
cdnDownloadReason: DeepReadonly<Ref<CdnDownloadReason>>
// Invalidate all project queries (auto-refetches active ones)
invalidate: () => Promise<void>