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>

View File

@@ -190,7 +190,7 @@
<span class="label__title">Fullscreen</span>
<span class="label__description"> Make the game start in full screen when launched. </span>
</label>
<Toggle id="fullscreen" v-model="fullscreen" :disabled="!overrideWindowSettings" />
<Checkbox id="fullscreen" v-model="fullscreenSetting" :disabled="!overrideWindowSettings" />
</div>
<div class="adjacent-input">
<label for="width">
@@ -201,7 +201,7 @@
id="width"
v-model="resolution[0]"
autocomplete="off"
:disabled="!overrideWindowSettings || fullscreen"
:disabled="!overrideWindowSettings || fullscreenSetting"
type="number"
placeholder="Enter width..."
/>
@@ -215,7 +215,7 @@
id="height"
v-model="resolution[1]"
autocomplete="off"
:disabled="!overrideWindowSettings || fullscreen"
:disabled="!overrideWindowSettings || fullscreenSetting"
type="number"
class="input"
placeholder="Enter height..."
@@ -352,7 +352,6 @@ import {
HammerIcon,
DownloadIcon,
ModalConfirm,
Toggle,
} from 'omorphia'
import { Multiselect } from 'vue-multiselect'
import { useRouter } from 'vue-router'
@@ -446,12 +445,12 @@ const overrideMemorySettings = ref(!!props.instance.memory)
const memory = ref(props.instance.memory ?? globalSettings.memory)
const maxMemory = Math.floor((await get_max_memory().catch(handleError)) / 1024)
const overrideWindowSettings = ref(!!props.instance.resolution)
const overrideWindowSettings = ref(!!props.instance.resolution || !!props.instance.fullscreen)
const resolution = ref(props.instance.resolution ?? globalSettings.game_resolution)
const overrideHooks = ref(!!props.instance.hooks)
const hooks = ref(props.instance.hooks ?? globalSettings.hooks)
const fullscreen = ref(props.instance.fullscreen)
const fullscreenSetting = ref(!!props.instance.fullscreen)
watch(
[
@@ -468,7 +467,7 @@ watch(
memory,
overrideWindowSettings,
resolution,
fullscreen,
fullscreenSetting,
overrideHooks,
hooks,
],
@@ -514,9 +513,9 @@ watch(
}
if (overrideWindowSettings.value) {
editProfile.fullscreen = fullscreen.value
editProfile.fullscreen = fullscreenSetting.value
if (!fullscreen.value) {
if (!fullscreenSetting.value) {
editProfile.resolution = resolution.value
}
}