Misc bugs 4 (#381)

* bug fixes

* fixed jres being undetected

* cleanup

* prettier

* fixed folders not displaying windows exporting

* fixes, more bugs

* missed function

* clippy, fmt

* prettier
This commit is contained in:
Wyatt Verchere
2023-07-28 19:56:49 -07:00
committed by GitHub
parent 744d11f09e
commit 87449f91c3
22 changed files with 171 additions and 78 deletions

View File

@@ -27,7 +27,7 @@ import {
import { handleError } from '@/store/notifications.js'
import { remove, run } from '@/helpers/profile.js'
import { useRouter } from 'vue-router'
import { showInFolder } from '@/helpers/utils.js'
import { showProfileInFolder } from '@/helpers/utils.js'
import { useFetch } from '@/helpers/fetch.js'
import { install as pack_install } from '@/helpers/pack.js'
import { useTheming } from '@/store/state.js'
@@ -155,7 +155,7 @@ const handleOptionsClick = async (args) => {
deleteConfirmModal.value.show()
break
case 'open_folder':
await showInFolder(args.item.path)
await showProfileInFolder(args.item.path)
break
case 'copy_path':
await navigator.clipboard.writeText(args.item.path)

View File

@@ -5,6 +5,7 @@ import { ref } from 'vue'
import { export_profile_mrpack, get_potential_override_folders } from '@/helpers/profile.js'
import { open } from '@tauri-apps/api/dialog'
import { handleError } from '@/store/notifications.js'
import { sep } from '@tauri-apps/api/path'
const props = defineProps({
instance: {
@@ -33,11 +34,11 @@ const initFiles = async () => {
filePaths
.map((folder) => ({
path: folder,
name: folder.split('/').pop(),
name: folder.split(sep).pop(),
selected: false,
}))
.forEach((pathData) => {
const parent = pathData.path.split('/').slice(0, -1).join('/')
const parent = pathData.path.split(sep).slice(0, -1).join(sep)
if (parent !== '') {
if (newFolders.has(parent)) {
newFolders.get(parent).push(pathData)

View File

@@ -31,14 +31,13 @@ defineExpose({
async function install() {
installing.value = true
console.log(`Installing ${projectId.value} ${version.value} ${title.value} ${icon.value}`)
confirmModal.value.hide()
await pack_install(
projectId.value,
version.value,
title.value,
icon.value ? icon.value : null
).catch(handleError)
confirmModal.value.hide()
mixpanel.track('PackInstall', {
id: projectId.value,
version_id: version.value,

View File

@@ -14,7 +14,7 @@ import {
import { process_listener } from '@/helpers/events'
import { useFetch } from '@/helpers/fetch.js'
import { handleError } from '@/store/state.js'
import { showInFolder } from '@/helpers/utils.js'
import { showProfileInFolder } from '@/helpers/utils.js'
import InstanceInstallModal from '@/components/ui/InstanceInstallModal.vue'
import mixpanel from 'mixpanel-browser'
@@ -155,7 +155,7 @@ const stop = async (e, context) => {
}
const openFolder = async () => {
await showInFolder(props.instance.path)
await showProfileInFolder(props.instance.path)
}
const addContent = async () => {