From 11a6469e4a3d82f85ddfb0b4330168278d32d0c4 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 31 Jul 2023 19:01:58 -0400 Subject: [PATCH] Fix more separator visual bugs, hide some nonfunctional settings --- launcher/ui/Settings/AccountSettings.qml | 34 +++++++++++++++--------- launcher/ui/Settings/ProfileSettings.qml | 21 ++++++++++----- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/launcher/ui/Settings/AccountSettings.qml b/launcher/ui/Settings/AccountSettings.qml index 086fb29..0fb15a0 100644 --- a/launcher/ui/Settings/AccountSettings.qml +++ b/launcher/ui/Settings/AccountSettings.qml @@ -74,6 +74,8 @@ Kirigami.ScrollablePage { } MobileForm.FormCheckDelegate { + id: needOTPField + text: i18n("Needs a one-time password") checked: page.account.useOTP onCheckedChanged: page.account.useOTP = checked @@ -81,13 +83,23 @@ Kirigami.ScrollablePage { } MobileForm.FormDelegateSeparator { + visible: needOTPField.visible } + MobileForm.FormTextFieldDelegate { + label: i18n("Lobby URL") + text: page.account.lobbyUrl + onTextChanged: page.account.lobbyUrl = text + visible: page.account.isSapphire + placeholderText: "neolobby0X.ffxiv.com" + } + + MobileForm.FormDelegateSeparator {} + MobileForm.FormButtonDelegate { text: i18n("Set Lodestone Character") description: i18n("Associate a character's avatar with this account.") icon.name: "actor" - visible: !page.account.isSapphire Kirigami.PromptDialog { id: lodestoneDialog title: i18n("Enter Lodestone Id") @@ -105,16 +117,6 @@ Kirigami.ScrollablePage { onClicked: lodestoneDialog.open() } - - MobileForm.FormDelegateSeparator {} - - MobileForm.FormTextFieldDelegate { - label: i18n("Lobby URL") - text: page.account.lobbyUrl - onTextChanged: page.account.lobbyUrl = text - visible: page.account.isSapphire - placeholderText: "neolobby0X.ffxiv.com" - } } } @@ -137,18 +139,24 @@ Kirigami.ScrollablePage { MobileForm.FormDelegateSeparator {} MobileForm.FormCheckDelegate { + id: generateOTPField + text: i18n("Automatically generate one-time passwords") checked: page.account.rememberOTP onCheckedChanged: page.account.rememberOTP = checked enabled: page.account.useOTP + visible: !page.account.isSapphire } - MobileForm.FormDelegateSeparator {} + MobileForm.FormDelegateSeparator { + visible: generateOTPField.visible + } MobileForm.FormButtonDelegate { text: i18n("Enter OTP Secret") icon.name: "list-add-symbolic" enabled: page.account.rememberOTP + visible: generateOTPField.visible Kirigami.PromptDialog { id: otpDialog title: i18n("Enter OTP Secret") @@ -176,7 +184,7 @@ Kirigami.ScrollablePage { MobileForm.FormButtonDelegate { text: i18n("Delete Account") - description: !enabled ? i18n("Cannot delete the only account") : "" + description: !enabled ? i18n("Cannot delete the only account.") : "" icon.name: "delete" enabled: LauncherCore.accountManager.canDelete(page.account) onClicked: { diff --git a/launcher/ui/Settings/ProfileSettings.qml b/launcher/ui/Settings/ProfileSettings.qml index f6c1e2f..88336ab 100644 --- a/launcher/ui/Settings/ProfileSettings.qml +++ b/launcher/ui/Settings/ProfileSettings.qml @@ -59,7 +59,6 @@ Kirigami.ScrollablePage { text: i18n("Encrypt Game Arguments") checked: page.profile.argumentsEncrypted onCheckedChanged: page.profile.argumentsEncrypted = checked - enabled: false } MobileForm.FormDelegateSeparator {} @@ -70,9 +69,12 @@ Kirigami.ScrollablePage { checked: page.profile.watchdogEnabled onCheckedChanged: page.profile.watchdogEnabled = checked enabled: false + visible: false } - MobileForm.FormDelegateSeparator {} + MobileForm.FormDelegateSeparator { + visible: false + } MobileForm.FormTextDelegate { description: page.profile.expansionVersionText @@ -146,14 +148,19 @@ Kirigami.ScrollablePage { description: i18n("A micro-compositor that uses Wayland to create a nested session.\nIf you use fullscreen mode, it may improve input handling.") checked: page.profile.gamescopeEnabled onCheckedChanged: page.profile.gamescopeEnabled = checked + visible: false + enabled: false } - MobileForm.FormDelegateSeparator {} + MobileForm.FormDelegateSeparator { + visible: false + } MobileForm.FormButtonDelegate { text: i18n("Configure Gamescope...") icon.name: "configure" - enabled: page.profile.gamescopeEnabled + enabled: false + visible: false Kirigami.PromptDialog { id: gamescopeSettingsDialog title: i18n("Configure Gamescope") @@ -193,7 +200,9 @@ Kirigami.ScrollablePage { onClicked: gamescopeSettingsDialog.open() } - MobileForm.FormDelegateSeparator {} + MobileForm.FormDelegateSeparator { + visible: false + } MobileForm.FormCheckDelegate { text: i18n("Enable Gamemode") @@ -253,7 +262,7 @@ Kirigami.ScrollablePage { MobileForm.FormButtonDelegate { text: i18n("Delete Profile") - description: !enabled ? i18n("Cannot delete the only profile") : "" + description: !enabled ? i18n("Cannot delete the only profile.") : "" icon.name: "delete" enabled: LauncherCore.profileManager.canDelete(page.profile) onClicked: {