refactor: remove telemetry and fix launcher workflows
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Deploy telemetry dashboard / deploy (push) Has been cancelled
Prepare pnpm cache / prepare (push) Has been cancelled
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Deploy telemetry dashboard / deploy (push) Has been cancelled
Prepare pnpm cache / prepare (push) Has been cancelled
This commit is contained in:
@ -1,75 +0,0 @@
|
||||
interface InstanceProperties {
|
||||
loader: string
|
||||
game_version: string
|
||||
}
|
||||
|
||||
interface ProjectProperties extends InstanceProperties {
|
||||
id: string
|
||||
project_type: string
|
||||
}
|
||||
|
||||
type AnalyticsEventMap = {
|
||||
Launched: { version: string; dev: boolean; onboarded: boolean }
|
||||
PageView: { path: string; fromPath: string; failed: unknown }
|
||||
InstanceCreate: { source: string }
|
||||
InstanceCreateStart: { source: string }
|
||||
InstanceStart: InstanceProperties & { source: string }
|
||||
InstanceStop: Partial<InstanceProperties> & { source?: string }
|
||||
InstanceDuplicate: InstanceProperties
|
||||
InstanceRepair: InstanceProperties
|
||||
InstanceSetIcon: Record<string, never>
|
||||
InstanceRemoveIcon: Record<string, never>
|
||||
InstanceUpdateAll: InstanceProperties & { count: number; selected: boolean }
|
||||
InstanceProjectUpdate: InstanceProperties & { id: string; name: string; project_type: string }
|
||||
InstanceProjectDisable: InstanceProperties & {
|
||||
id: string
|
||||
name: string
|
||||
project_type: string
|
||||
disabled: boolean
|
||||
}
|
||||
InstanceProjectRemove: InstanceProperties & { id: string; name: string; project_type: string }
|
||||
ProjectInstall: ProjectProperties & { version_id: string; title: string; source: string }
|
||||
ProjectInstallStart: { source: string }
|
||||
PackInstall: { id: string; version_id: string; title: string; source: string }
|
||||
PackInstallStart: Record<string, never>
|
||||
AccountLogIn: { source?: string }
|
||||
AccountLogOut: Record<string, never>
|
||||
JavaTest: { path: string; success: boolean }
|
||||
JavaManualSelect: { version: string }
|
||||
JavaAutoDetect: { path: string; version: string }
|
||||
GalleryImageNext: { project_id: string; url: string }
|
||||
GalleryImagePrevious: { project_id: string; url: unknown }
|
||||
GalleryImageExpand: { project_id: string; url: string }
|
||||
}
|
||||
|
||||
export type AnalyticsEvent = keyof AnalyticsEventMap
|
||||
|
||||
let optedIn = false
|
||||
let debugEnabled = false
|
||||
|
||||
export const initAnalytics = () => {
|
||||
optedIn = true
|
||||
}
|
||||
|
||||
export const debugAnalytics = () => {
|
||||
debugEnabled = true
|
||||
}
|
||||
|
||||
export const optOutAnalytics = () => {
|
||||
optedIn = false
|
||||
}
|
||||
|
||||
export const optInAnalytics = () => {
|
||||
optedIn = true
|
||||
}
|
||||
|
||||
type OptionalArgs<T> = Record<string, never> extends T ? [properties?: T] : [properties: T]
|
||||
|
||||
export const trackEvent = <E extends AnalyticsEvent>(
|
||||
eventName: E,
|
||||
...args: OptionalArgs<AnalyticsEventMap[E]>
|
||||
) => {
|
||||
if (optedIn && debugEnabled) {
|
||||
console.debug('[Axolotl telemetry disabled]', eventName, args[0])
|
||||
}
|
||||
}
|
||||
@ -652,10 +652,6 @@ export async function update_project(instanceId: string, projectPath: string): P
|
||||
return await invoke('plugin:instance|instance_update_project', { instanceId, projectPath })
|
||||
}
|
||||
|
||||
// Add a project to an instance from a version
|
||||
// Returns a path to the new project file
|
||||
export type DownloadReason = 'standalone' | 'dependency' | 'modpack' | 'update'
|
||||
|
||||
export interface ResolutionPreferences {
|
||||
game_versions?: string[]
|
||||
loaders?: string[]
|
||||
@ -691,14 +687,10 @@ export interface ResolveContentPlan {
|
||||
export async function add_project_from_version(
|
||||
instanceId: string,
|
||||
versionId: string,
|
||||
reason: DownloadReason,
|
||||
dependentOnVersionId?: string,
|
||||
): Promise<string> {
|
||||
return await invoke('plugin:instance|instance_add_project_from_version', {
|
||||
instanceId,
|
||||
versionId,
|
||||
reason,
|
||||
dependentOnVersionId,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -175,9 +175,6 @@ export type AppSettings = {
|
||||
home_widgets: HomeDashboardConfig | null
|
||||
terracotta_public_nodes: string[]
|
||||
|
||||
telemetry: boolean
|
||||
telemetry_consent_version: number
|
||||
discord_rpc: boolean
|
||||
onboarded: boolean
|
||||
onboarding_version: number
|
||||
onboarding_instance_tour_completed: boolean
|
||||
@ -207,12 +204,6 @@ export type AppSettings = {
|
||||
version: number
|
||||
}
|
||||
|
||||
export type PrivacySettings = {
|
||||
telemetry: boolean
|
||||
discord_rpc: boolean
|
||||
consent_version: number
|
||||
}
|
||||
|
||||
type LegacyMirrorSettings = {
|
||||
use_minecraft_mirror?: boolean
|
||||
use_modrinth_mirror?: boolean
|
||||
@ -301,22 +292,6 @@ export async function cancel_directory_change(): Promise<void> {
|
||||
return await invoke('plugin:settings|cancel_directory_change')
|
||||
}
|
||||
|
||||
export async function getPrivacySettings(): Promise<PrivacySettings> {
|
||||
return await invoke('plugin:settings|privacy_get')
|
||||
}
|
||||
|
||||
export async function savePrivacySettings(privacy: PrivacySettings): Promise<PrivacySettings> {
|
||||
return await invoke('plugin:settings|privacy_set', { privacy })
|
||||
}
|
||||
|
||||
export async function setTelemetryEnabled(enabled: boolean): Promise<PrivacySettings> {
|
||||
return await invoke('plugin:settings|telemetry_set', { enabled })
|
||||
}
|
||||
|
||||
export async function setDiscordRpcEnabled(enabled: boolean): Promise<PrivacySettings> {
|
||||
return await invoke('plugin:settings|discord_rpc_set', { enabled })
|
||||
}
|
||||
|
||||
export async function getProxyConfig(): Promise<ProxyConfig> {
|
||||
return await invoke('plugin:settings|proxy_get')
|
||||
}
|
||||
|
||||
@ -44,10 +44,6 @@ export async function initialize_state() {
|
||||
return await invoke<void>('initialize_state')
|
||||
}
|
||||
|
||||
export async function set_discord_activity(activity: string) {
|
||||
return await invoke<void>('set_discord_activity', { activity })
|
||||
}
|
||||
|
||||
// Gets active progress bars
|
||||
export async function progress_bars_list() {
|
||||
return await invoke<Record<string, LoadingBar>>('plugin:utils|progress_bars_list')
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
|
||||
export function installTelemetryHandlers(): void {
|
||||
window.addEventListener('online', () => {
|
||||
void invoke('plugin:telemetry|notify_online').catch(() => undefined)
|
||||
})
|
||||
}
|
||||
2
apps/app-frontend/src/helpers/types.d.ts
vendored
2
apps/app-frontend/src/helpers/types.d.ts
vendored
@ -216,8 +216,6 @@ type AppSettings = {
|
||||
close_behavior: 'ask' | 'close' | 'lightweight'
|
||||
home_widgets: import('@/components/home/home-dashboard').HomeDashboardConfig | null
|
||||
|
||||
telemetry: boolean
|
||||
discord_rpc: boolean
|
||||
developer_mode: boolean
|
||||
|
||||
onboarded: boolean
|
||||
|
||||
Reference in New Issue
Block a user