mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
Add button to change the install folder when setting up a profile
This is useful if you want to set up the game on an external disk or SD card, for example.
This commit is contained in:
parent
4948db82be
commit
d83faa6bbb
1 changed files with 27 additions and 2 deletions
|
@ -19,10 +19,17 @@ FormCard.FormCardPage {
|
||||||
|
|
||||||
title: isInitialSetup ? i18n("Initial Setup") : i18n("Profile Setup")
|
title: isInitialSetup ? i18n("Initial Setup") : i18n("Profile Setup")
|
||||||
|
|
||||||
|
data: FolderDialog {
|
||||||
|
id: installFolderDialog
|
||||||
|
|
||||||
|
onAccepted: page.profile.gamePath = decodeURIComponent(selectedFolder.toString().replace("file://", ""))
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: "qrc:/zone.xiv.astra.svg"
|
source: "qrc:/zone.xiv.astra.svg"
|
||||||
|
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
visible: !LauncherCore.profileManager.hasAnyExistingInstallations()
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
@ -31,16 +38,34 @@ FormCard.FormCardPage {
|
||||||
|
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: LauncherCore.profileManager.hasAnyExistingInstallations() ? Kirigami.Units.largeSpacing : 0
|
||||||
|
|
||||||
FormCard.FormTextDelegate {
|
FormCard.FormTextDelegate {
|
||||||
|
id: helpText
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
if (page.isInitialSetup) {
|
if (page.isInitialSetup) {
|
||||||
return i18n("You must have a legitimate installation of the FFXIV to continue.");
|
return i18n("You must have a legitimate installation of FFXIV to continue.");
|
||||||
} else {
|
} else {
|
||||||
return i18n("Select a game installation of FFXIV for '%1'.", page.profile.name);
|
return i18n("Select a game installation for '%1'.", page.profile.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FormCard.FormDelegateSeparator {
|
||||||
|
above: helpText
|
||||||
|
below: selectInstallFolder
|
||||||
|
}
|
||||||
|
|
||||||
|
FormCard.FormButtonDelegate {
|
||||||
|
id: selectInstallFolder
|
||||||
|
|
||||||
|
icon.name: "document-open-folder"
|
||||||
|
text: i18n("Select Install Folder")
|
||||||
|
description: profile.gamePath
|
||||||
|
|
||||||
|
onClicked: installFolderDialog.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormHeader {
|
FormCard.FormHeader {
|
||||||
|
|
Loading…
Add table
Reference in a new issue