Have app send download analytics meta (#5954)

* wip: add download reasons to app

* update how download meta is gathered

* cargo fmt

* prepr frontend
This commit is contained in:
aecsocket
2026-04-30 20:55:47 +01:00
committed by GitHub
parent 38a39feef1
commit 1875b89556
20 changed files with 195 additions and 32 deletions

View File

@@ -184,8 +184,18 @@ export async function update_project(path: string, projectPath: string): Promise
// Add a project to a profile from a version
// Returns a path to the new project file
export async function add_project_from_version(path: string, versionId: string): Promise<string> {
return await invoke('plugin:profile|profile_add_project_from_version', { path, versionId })
export type DownloadReason = 'standalone' | 'dependency' | 'modpack'
export async function add_project_from_version(
path: string,
versionId: string,
reason: DownloadReason,
): Promise<string> {
return await invoke('plugin:profile|profile_add_project_from_version', {
path,
versionId,
reason,
})
}
// Add a project to a profile from a path + project_type