@@ -21,7 +21,6 @@ import { useRouter } from 'vue-router'
2121
2222import { useAppEvent } from ' @/composables/use-app-event'
2323import { handleSevereError } from ' @/composables/use-error.js'
24- import { trackEvent } from ' @/helpers/analytics'
2524import { install_existing_instance , install_pack_to_existing_instance } from ' @/helpers/install'
2625import { getInstanceIconUrl , kill , run } from ' @/helpers/instance'
2726import { 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
113100const 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]" / >
0 commit comments