Analytics + more bug fixes (#144)

* Analytics + more bug fixes

* debug deadlock

* Fix mostly everything

* merge fixes

* fix rest

* final fixeS
This commit is contained in:
Geometrically
2023-06-19 14:59:06 -07:00
committed by GitHub
parent 84d731b670
commit 1e78a7b6a8
51 changed files with 1285 additions and 491 deletions

View File

@@ -2,6 +2,10 @@
import { Button, Modal, XIcon, DownloadIcon } from 'omorphia'
import { install as pack_install } from '@/helpers/pack'
import { ref } from 'vue'
import mixpanel from 'mixpanel-browser'
import { useTheming } from '@/store/theme.js'
const themeStore = useTheming()
const version = ref('')
const title = ref('')
@@ -11,12 +15,14 @@ const confirmModal = ref(null)
const installing = ref(false)
defineExpose({
show: (id, projectId, projectTitle, projectIcon) => {
show: (id, projectIdVal, projectTitle, projectIcon) => {
version.value = id
projectId.value = projectId
projectId.value = projectIdVal
title.value = projectTitle
icon.value = projectIcon
confirmModal.value.show()
mixpanel.track('PackInstallStart')
},
})
@@ -24,11 +30,18 @@ async function install() {
installing.value = true
await pack_install(projectId.value, version.value, title.value, icon.value ? icon.value : null)
confirmModal.value.hide()
mixpanel.track('PackInstall', {
id: projectId.value,
version_id: version.value,
title: title.value,
source: 'ConfirmModal',
})
}
</script>
<template>
<Modal ref="confirmModal" header="Are you sure?">
<Modal ref="confirmModal" header="Are you sure?" :noblur="!themeStore.advancedRendering">
<div class="modal-body">
<p>You already have this modpack installed. Are you sure you want to install it again?</p>
<div class="input-group push-right">