New Alpha Final Fixes (#365)

This commit is contained in:
Geometrically
2023-07-27 01:31:28 -07:00
committed by GitHub
parent c364468ed5
commit 744d11f09e
14 changed files with 57 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "theseus_gui"
version = "0.2.2"
version = "0.3.0"
description = "A Tauri App"
authors = ["you"]
license = ""

View File

@@ -276,7 +276,7 @@ pub struct EditProfile {
pub memory: Option<MemorySettings>,
pub resolution: Option<WindowSize>,
pub hooks: Option<Hooks>,
pub force_fullscreen: Option<SetFullscreen>,
pub fullscreen: Option<bool>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
@@ -316,9 +316,7 @@ pub async fn profile_edit(
prof.java = edit_profile.java.clone();
prof.memory = edit_profile.memory;
prof.resolution = edit_profile.resolution;
if let Some(force_fullscreen) = edit_profile.force_fullscreen {
prof.force_fullscreen = force_fullscreen;
}
prof.fullscreen = edit_profile.fullscreen;
prof.hooks = edit_profile.hooks.clone();
prof.metadata.date_modified = chrono::Utc::now();

View File

@@ -8,7 +8,7 @@
},
"package": {
"productName": "Modrinth App",
"version": "0.2.2"
"version": "0.3.0"
},
"tauri": {
"allowlist": {

View File

@@ -144,7 +144,7 @@ watch(
"
/>
</div>
<div class="opening-page">
<div class="adjacent-input">
<label for="opening-page">
<span class="label__title">Default landing page</span>
<span class="label__description">Change the page to which the launcher opens on.</span>
@@ -329,6 +329,15 @@ watch(
<span class="label__title size-card-header">Window size</span>
</h3>
</div>
<div class="adjacent-input">
<label for="fullscreen">
<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="settings.fullscreen" />
</div>
<div class="adjacent-input">
<label for="width">
<span class="label__title">Width</span>
@@ -337,6 +346,7 @@ watch(
<input
id="width"
v-model="settings.game_resolution[0]"
:disabled="settings.fullscreen"
autocomplete="off"
type="number"
placeholder="Enter width..."
@@ -350,6 +360,7 @@ watch(
<input
id="height"
v-model="settings.game_resolution[1]"
:disabled="settings.fullscreen"
autocomplete="off"
type="number"
class="input"

View File

@@ -183,10 +183,14 @@
</h3>
</div>
<div class="adjacent-input">
<DropdownSelect v-model="forceFullscreen" :options="fullscreenOptions" />
<Checkbox v-model="overrideWindowSettings" label="Override global window settings" />
</div>
<div class="adjacent-input">
<Checkbox v-model="overrideWindowSettings" label="Override global window settings" />
<label for="fullscreen">
<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" />
</div>
<div class="adjacent-input">
<label for="width">
@@ -197,7 +201,7 @@
id="width"
v-model="resolution[0]"
autocomplete="off"
:disabled="!overrideWindowSettings"
:disabled="!overrideWindowSettings || fullscreen"
type="number"
placeholder="Enter width..."
/>
@@ -211,7 +215,7 @@
id="height"
v-model="resolution[1]"
autocomplete="off"
:disabled="!overrideWindowSettings"
:disabled="!overrideWindowSettings || fullscreen"
type="number"
class="input"
placeholder="Enter height..."
@@ -295,7 +299,7 @@
</div>
<div v-if="props.instance.modrinth_update_version" class="adjacent-input">
<label for="repair-profile">
<span class="label__title">Repair modpack</span>
<span class="label__title">Reinstall modpack</span>
<span class="label__description">
Reinstalls Modrinth modpack and checks for corruption. Use this if your game is not
launching due to your instance diverging from the Modrinth modpack.
@@ -307,7 +311,7 @@
:disabled="repairing"
@click="repairModpack"
>
<HammerIcon /> Repair
<DownloadIcon /> Reinstall
</button>
</div>
@@ -346,7 +350,9 @@ import {
XIcon,
SaveIcon,
HammerIcon,
DownloadIcon,
ModalConfirm,
Toggle,
} from 'omorphia'
import { Multiselect } from 'vue-multiselect'
import { useRouter } from 'vue-router'
@@ -445,8 +451,7 @@ const resolution = ref(props.instance.resolution ?? globalSettings.game_resoluti
const overrideHooks = ref(!!props.instance.hooks)
const hooks = ref(props.instance.hooks ?? globalSettings.hooks)
const fullscreenOptions = ref(['Leave unchanged', 'Set windowed', 'Set fullscreen'])
const forceFullscreen = ref(props.instance.force_fullscreen)
const fullscreen = ref(props.instance.fullscreen)
watch(
[
@@ -463,7 +468,7 @@ watch(
memory,
overrideWindowSettings,
resolution,
forceFullscreen,
fullscreen,
overrideHooks,
hooks,
],
@@ -508,11 +513,11 @@ watch(
}
if (overrideWindowSettings.value) {
editProfile.resolution = resolution.value
}
editProfile.fullscreen = fullscreen.value
if (forceFullscreen.value) {
editProfile.force_fullscreen = forceFullscreen.value
if (!fullscreen.value) {
editProfile.resolution = resolution.value
}
}
if (overrideHooks.value) {