mirror of
https://github.com/modrinth/code.git
synced 2026-08-28 18:45:15 +00:00
feat: add download metadata to website (#6034)
* feat: add download metadata to website * add to project cards
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user