Skip to content

Commit 5416bc8

Browse files
committed
chore: further integrate!
1 parent 6db469c commit 5416bc8

41 files changed

Lines changed: 289 additions & 529 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎apps/app-frontend/src/App.vue‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ import {
121121
should_show_ads_consent_popup,
122122
take_ads_window_hold,
123123
} from '@/helpers/ads.js'
124-
import { debugAnalytics, initAnalytics, trackEvent } from '@/helpers/analytics'
125124
import { check_reachable } from '@/helpers/auth.js'
126125
import { get_user, get_user_many, get_version } from '@/helpers/cache.js'
127126
import { gameSettingsQueryOptions } from '@/helpers/game-options'
@@ -708,7 +707,6 @@ async function setupApp() {
708707
native_decorations,
709708
theme,
710709
locale,
711-
telemetry,
712710
hide_nametag_skins_page,
713711
advanced_rendering,
714712
toggle_sidebar,
@@ -799,12 +797,6 @@ async function setupApp() {
799797
}),
800798
)
801799
802-
if (telemetry) {
803-
initAnalytics()
804-
if (dev) debugAnalytics()
805-
trackEvent('Launched', { version, dev })
806-
}
807-
808800
const osType = await traceStartupStep('Read operating system type', async () => type())
809801
if (osType === 'macos') {
810802
document.getElementsByTagName('html')[0].classList.add('mac')
@@ -1542,9 +1534,6 @@ async function handleCommand(e) {
15421534
} else {
15431535
await install_create_modpack_instance(location).catch(handleError)
15441536
}
1545-
trackEvent('InstanceCreate', {
1546-
source: 'CreationModalFileDrop',
1547-
})
15481537
}
15491538
} else if (e.event === 'LaunchInstance') {
15501539
const instance = await getInstance(e.id).catch(handleError)

‎apps/app-frontend/src/app/runtime/use-route-loading.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { onScopeDispose, type Ref, ref, watch } from 'vue'
22
import { useRoute, useRouter } from 'vue-router'
33

4-
import { trackEvent } from '@/helpers/analytics'
54
import { debugStartup } from '@/helpers/startup-debug'
65

76
import { useAppLoadingState } from './use-app-loading-state'
@@ -64,11 +63,6 @@ export function useRouteLoading({ stateInitialized, stateFailed }: RouteLoadingO
6463
const removeAfterEach = router.afterEach((to, from, failure) => {
6564
debugStartup('Route navigation settled', { to: to.path, failed: !!failure })
6665
updateHistoryNavigationState()
67-
trackEvent('PageView', {
68-
path: to.path,
69-
fromPath: from.path,
70-
failed: !!failure,
71-
})
7266
const timer = setTimeout(() => {
7367
releaseTimers.delete(timer)
7468
debugStartup('Route loading release check', {

‎apps/app-frontend/src/app/shell/title-bar/action-bar.vue‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ import { useRouter } from 'vue-router'
148148
import AppUpdateButton from '@/components/ui/app-update-button/index.vue'
149149
import DownloadManager from '@/components/ui/download-manager/index.vue'
150150
import { useAppEvent } from '@/composables/use-app-event'
151-
import { trackEvent } from '@/helpers/analytics'
152151
import { get_many as getInstances } from '@/helpers/instance'
153152
import { get_all as getRunningProcesses, kill as killProcess } from '@/helpers/process'
154153
import type { LoadingBar } from '@/helpers/state'
@@ -300,12 +299,6 @@ useAppEvent('process', async () => {
300299
const stop = async (process: RunningProcess) => {
301300
try {
302301
await killProcess(process.uuid).catch(handleError)
303-
304-
trackEvent('InstanceStop', {
305-
loader: process.instance.loader,
306-
game_version: process.instance.game_version,
307-
source: 'AppBar',
308-
})
309302
} catch (e) {
310303
console.error(e)
311304
}

‎apps/app-frontend/src/components/ui/ErrorModal.vue‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { computed, ref } from 'vue'
2323
import { ChatIcon } from '@/assets/icons'
2424
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
2525
import { handleSevereError } from '@/composables/use-error.js'
26-
import { trackEvent } from '@/helpers/analytics'
2726
import { login as login_flow, set_default_user } from '@/helpers/auth.js'
2827
import { install_existing_instance } from '@/helpers/install'
2928
import { cancel_directory_change } from '@/helpers/settings.ts'
@@ -120,7 +119,6 @@ async function loginMinecraft() {
120119
await set_default_user(loggedIn.profile.id).catch(handleError)
121120
}
122121
123-
await trackEvent('AccountLogIn', { source: 'ErrorModal' })
124122
loadingMinecraft.value = false
125123
errorModal.value.hide()
126124
} catch (err) {

‎apps/app-frontend/src/components/ui/Instance.vue‎

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { useRouter } from 'vue-router'
2121
2222
import { useAppEvent } from '@/composables/use-app-event'
2323
import { handleSevereError } from '@/composables/use-error.js'
24-
import { trackEvent } from '@/helpers/analytics'
2524
import { install_existing_instance, install_pack_to_existing_instance } from '@/helpers/install'
2625
import { getInstanceIconUrl, kill, run } from '@/helpers/instance'
2726
import { get_by_instance_id } from '@/helpers/process'
@@ -81,33 +80,21 @@ const checkProcess = async () => {
8180
playing.value = runningProcesses.length > 0
8281
}
8382
84-
const play = async (e, context) => {
83+
const play = async (e) => {
8584
e?.stopPropagation()
8685
if (props.instance.launch_blocked || installing.value || modLoading.value) return
8786
loading.value = true
88-
await run(props.instance.id)
89-
.catch((err) => handleSevereError(err, { instanceId: props.instance.id }))
90-
.finally(() => {
91-
trackEvent('InstanceStart', {
92-
loader: props.instance.loader,
93-
game_version: props.instance.game_version,
94-
source: context,
95-
})
96-
})
87+
await run(props.instance.id).catch((err) =>
88+
handleSevereError(err, { instanceId: props.instance.id }),
89+
)
9790
loading.value = false
9891
}
9992
100-
const stop = async (e, context) => {
93+
const stop = async (e) => {
10194
e?.stopPropagation()
10295
playing.value = false
10396
10497
await kill(props.instance.id).catch(handleError)
105-
106-
trackEvent('InstanceStop', {
107-
loader: props.instance.loader,
108-
game_version: props.instance.game_version,
109-
source: context,
110-
})
11198
}
11299
113100
const repair = async (e) => {
@@ -192,7 +179,7 @@ onMounted(() => {
192179
color="red"
193180
:label="formatMessage(messages.stop)"
194181
@mouseenter="checkProcess"
195-
@click="(e) => stop(e, 'InstanceCard')"
182+
@click="(e) => stop(e)"
196183
>
197184
<StopCircleIcon />
198185
</IconButton>
@@ -210,7 +197,7 @@ onMounted(() => {
210197
:type="first ? 'colored' : 'base'"
211198
:color="first ? 'brand' : undefined"
212199
:label="formatMessage(messages.play)"
213-
@click="(e) => play(e, 'InstanceCard')"
200+
@click="(e) => play(e)"
214201
@mouseenter="checkProcess"
215202
>
216203
<!-- Translate for optical centering -->
@@ -257,7 +244,7 @@ onMounted(() => {
257244
:label="formatMessage(messages.stop)"
258245
:class="{ 'scale-100 opacity-100': playing }"
259246
class="transition-all scale-75 origin-bottom opacity-0 card-shadow"
260-
@click="(e) => stop(e, 'InstanceCard')"
247+
@click="(e) => stop(e)"
261248
@mouseenter="checkProcess"
262249
>
263250
<StopCircleIcon />
@@ -288,7 +275,7 @@ onMounted(() => {
288275
size="xl"
289276
:label="formatMessage(messages.play)"
290277
class="transition-all scale-75 group-hover:scale-100 group-focus-within:scale-100 origin-bottom opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 card-shadow"
291-
@click="(e) => play(e, 'InstanceCard')"
278+
@click="(e) => play(e)"
292279
@mouseenter="checkProcess"
293280
>
294281
<PlayIcon class="translate-x-[2px]" />

‎apps/app-frontend/src/components/ui/QuickInstanceSwitcher.vue‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
useQuickInstanceLimit,
2525
} from '@/composables/use-quick-instance-limit.ts'
2626
import { useHiddenInstances } from '@/features/library/hidden-instances/use-hidden-instances'
27-
import { trackEvent } from '@/helpers/analytics'
2827
import { getInstanceIconUrl, kill, run } from '@/helpers/instance'
2928
import { get_all } from '@/helpers/process'
3029
import { showInstanceInFolder } from '@/helpers/utils'
@@ -291,24 +290,11 @@ async function checkProcesses() {
291290
292291
async function playInstance(instance) {
293292
if (instance.launch_blocked || instance.install_stage !== 'installed') return
294-
await run(instance.id)
295-
.catch((err) => handleSevereError(err, { instanceId: instance.id }))
296-
.finally(() => {
297-
trackEvent('InstanceStart', {
298-
loader: instance.loader,
299-
game_version: instance.game_version,
300-
source: 'QuickInstanceSwitcher',
301-
})
302-
})
293+
await run(instance.id).catch((err) => handleSevereError(err, { instanceId: instance.id }))
303294
}
304295
305296
async function stopInstance(instance) {
306297
await kill(instance.id).catch(handleError)
307-
trackEvent('InstanceStop', {
308-
loader: instance.loader,
309-
game_version: instance.game_version,
310-
source: 'QuickInstanceSwitcher',
311-
})
312298
}
313299
314300
function openContextMenu(event, instance) {

‎apps/app-frontend/src/components/ui/install_flow/AddServerToInstanceModal.vue‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { useQueryClient } from '@tanstack/vue-query'
1313
import { computed, ref } from 'vue'
1414
1515
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
16-
import { trackEvent } from '@/helpers/analytics'
1716
import { getInstanceIconUrl, list } from '@/helpers/instance'
1817
import { add_server_to_instance, get_instance_worlds } from '@/helpers/worlds.ts'
1918
import { instanceKeys } from '@/pages/instance/query-options'
@@ -75,8 +74,6 @@ defineExpose({
7574
7675
instances.value = instanceValues
7776
modal.value.show()
78-
79-
trackEvent('AddServerToInstanceStart', { source: 'AddServerToInstanceModal' })
8077
},
8178
})
8279
@@ -86,12 +83,6 @@ async function addServer(instance) {
8683
await add_server_to_instance(instance.id, serverName.value, serverAddress.value, 'prompt')
8784
instance.added = true
8885
await queryClient.invalidateQueries({ queryKey: instanceKeys.worlds(instance.id) })
89-
90-
trackEvent('AddServerToInstance', {
91-
server_name: serverName.value,
92-
instance_name: instance.name,
93-
source: 'AddServerToInstanceModal',
94-
})
9586
} catch (err) {
9687
handleError(err)
9788
}

‎apps/app-frontend/src/components/ui/library/instance-group/instance-card.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ defineExpose({
252252
type="colored"
253253
color="red"
254254
:size="compact ? 'md' : 'lg'"
255-
@click="(e) => stop(e, 'InstanceCard')"
255+
@click="(e) => stop(e)"
256256
@mouseenter="checkProcess"
257257
>
258258
<StopCircleIcon />
@@ -288,7 +288,7 @@ defineExpose({
288288
color="brand"
289289
:size="compact ? 'md' : 'lg'"
290290
class="origin-bottom scale-75 opacity-0 transition-opacity group-hover/card:scale-100 group-hover/card:opacity-100 group-focus-visible/card:scale-100 group-focus-visible/card:opacity-100 group-has-[:focus-visible]/card:scale-100 group-has-[:focus-visible]/card:opacity-100"
291-
@click="(e) => play(e, 'InstanceCard')"
291+
@click="(e) => play(e)"
292292
@mouseenter="checkProcess"
293293
>
294294
<PlayIcon class="translate-x-px" />

‎apps/app-frontend/src/components/ui/minecraft-required-modal/MinecraftRequiredModal.vue‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import { ref } from 'vue'
6464
import steveImage from '@/assets/steve-look-up-left.webp'
6565
import { handleSevereError } from '@/composables/use-error.js'
6666
import { injectMinecraftAccounts } from '@/features/minecraft-accounts/context'
67-
import { trackEvent } from '@/helpers/analytics'
6867
import { login as loginFlow, set_default_user } from '@/helpers/auth.js'
6968
7069
const { formatMessage } = useVIntl()
@@ -118,7 +117,6 @@ async function signIn() {
118117
119118
await set_default_user(loggedIn.profile.id)
120119
await minecraftAccounts.value?.refreshValues()
121-
await trackEvent('AccountLogIn', { source: 'MinecraftRequiredModal' })
122120
modal.value?.hide()
123121
} catch (error) {
124122
handleSevereError(error)

0 commit comments

Comments
 (0)