mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 04:57:44 +00:00
Add action to quickly open the user folder in account settings
This commit is contained in:
parent
ac42886bf1
commit
346f4eae9e
3 changed files with 13 additions and 0 deletions
|
@ -79,6 +79,7 @@ public:
|
|||
|
||||
/// Returns the path to the FFXIV config folder
|
||||
[[nodiscard]] QDir getConfigDir() const;
|
||||
[[nodiscard]] Q_INVOKABLE QString getConfigPath() const;
|
||||
|
||||
/// Updates FFXIV.cfg with some recommended options like turning the opening cutscene movie off
|
||||
void updateConfig();
|
||||
|
|
|
@ -223,6 +223,11 @@ QDir Account::getConfigDir() const
|
|||
return userDir.absoluteFilePath(m_key);
|
||||
}
|
||||
|
||||
QString Account::getConfigPath() const
|
||||
{
|
||||
return getConfigDir().absolutePath();
|
||||
}
|
||||
|
||||
void Account::fetchAvatar()
|
||||
{
|
||||
if (lodestoneId().isEmpty()) {
|
||||
|
|
|
@ -19,6 +19,13 @@ FormCard.FormCardPage {
|
|||
title: i18nc("@title:window", "Edit Account")
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Open User Folder…")
|
||||
tooltip: i18n("The user folder contains saved appearance data and character settings for this account.")
|
||||
icon.name: "folder-open-symbolic"
|
||||
|
||||
onTriggered: Qt.openUrlExternally("file://" + page.account.getConfigPath())
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Delete Account…")
|
||||
tooltip: !enabled ? i18n("Cannot delete the only account.") : ""
|
||||
|
|
Loading…
Add table
Reference in a new issue