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

@@ -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)