You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user