Bug fixes (#406)

* skip duplicates

* slash, exports

* fullscreen, exports

* more bugs

* fixed mac title bar

* filters should go to top of page when changed

* mac err, loading bars

* temporary comments

* moving to mac

* bug fixes, fmt, prettier

* review fixes

* rev fixes
This commit is contained in:
Wyatt Verchere
2023-08-03 10:29:58 -07:00
committed by GitHub
parent ddbd08bc8c
commit b772f916b1
15 changed files with 133 additions and 87 deletions

View File

@@ -351,6 +351,7 @@ import { listen } from '@tauri-apps/api/event'
import { convertFileSrc } from '@tauri-apps/api/tauri'
import { showProfileInFolder } from '@/helpers/utils.js'
import { MenuIcon, ToggleIcon, TextInputIcon, AddProjectImage } from '@/assets/icons'
import { install_from_file } from '@/helpers/pack'
const router = useRouter()
@@ -769,10 +770,17 @@ watch(selectAll, () => {
})
listen('tauri://file-drop', async (event) => {
for (const file of event.payload) {
await add_project_from_path(props.instance.path, file, 'mod').catch(handleError)
if (event.payload && event.payload.length > 0 && event.payload[0].endsWith('.mrpack')) {
await install_from_file(event.payload[0]).catch(handleError)
} else {
for (const file of event.payload) {
await add_project_from_path(props.instance.path, file, 'mod').catch(handleError)
}
initProjects(await get(props.instance.path).catch(handleError))
}
initProjects(await get(props.instance.path).catch(handleError))
mixpanel.track('InstanceCreate', {
source: 'FileDrop',
})
})
</script>