1
Fork 0
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:
Joshua Goins 2024-04-19 20:50:14 -04:00
parent ac42886bf1
commit 346f4eae9e
3 changed files with 13 additions and 0 deletions

View file

@ -79,6 +79,7 @@ public:
/// Returns the path to the FFXIV config folder /// Returns the path to the FFXIV config folder
[[nodiscard]] QDir getConfigDir() const; [[nodiscard]] QDir getConfigDir() const;
[[nodiscard]] Q_INVOKABLE QString getConfigPath() const;
/// Updates FFXIV.cfg with some recommended options like turning the opening cutscene movie off /// Updates FFXIV.cfg with some recommended options like turning the opening cutscene movie off
void updateConfig(); void updateConfig();

View file

@ -223,6 +223,11 @@ QDir Account::getConfigDir() const
return userDir.absoluteFilePath(m_key); return userDir.absoluteFilePath(m_key);
} }
QString Account::getConfigPath() const
{
return getConfigDir().absolutePath();
}
void Account::fetchAvatar() void Account::fetchAvatar()
{ {
if (lodestoneId().isEmpty()) { if (lodestoneId().isEmpty()) {

View file

@ -19,6 +19,13 @@ FormCard.FormCardPage {
title: i18nc("@title:window", "Edit Account") title: i18nc("@title:window", "Edit Account")
actions: [ 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 { Kirigami.Action {
text: i18n("Delete Account…") text: i18n("Delete Account…")
tooltip: !enabled ? i18n("Cannot delete the only account.") : "" tooltip: !enabled ? i18n("Cannot delete the only account.") : ""