1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 20:47:45 +00:00
astra/launcher/ui/Settings/GeneralSettings.qml

90 lines
2.4 KiB
QML
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
2023-09-17 19:20:41 -04:00
import QtQuick
import QtQuick.Controls as QQC2
2023-09-20 15:30:50 -04:00
import QtQuick.Layouts
2023-09-17 19:20:41 -04:00
2023-09-20 15:30:50 -04:00
import org.kde.kirigami as Kirigami
2023-09-16 18:15:11 -04:00
import org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
2023-08-19 10:49:00 -04:00
FormCard.FormCardPage {
2023-09-20 15:30:50 -04:00
title: i18nc("@title:window", "General")
2023-08-19 10:49:00 -04:00
FormCard.FormCard {
2023-09-20 15:30:50 -04:00
Layout.topMargin: Kirigami.Units.largeSpacing
2023-09-17 19:20:41 -04:00
FormCard.FormButtonDelegate {
text: i18n("Auto-login Profile")
description: LauncherCore.autoLoginProfile ? LauncherCore.autoLoginProfile.name : i18n("Disabled")
QQC2.Menu {
id: profileMenu
QQC2.MenuItem {
text: "Disabled"
onClicked: {
LauncherCore.autoLoginProfile = null;
profileMenu.close();
}
}
Repeater {
model: LauncherCore.profileManager
QQC2.MenuItem {
required property var profile
text: profile.name
onClicked: {
LauncherCore.autoLoginProfile = profile;
profileMenu.close();
}
}
}
}
onClicked: profileMenu.popup()
}
FormCard.FormDelegateSeparator {}
2023-08-19 10:49:00 -04:00
FormCard.FormCheckDelegate {
id: closeAstraDelegate
text: i18n("Close Astra when game is launched")
checked: LauncherCore.closeWhenLaunched
onCheckedChanged: LauncherCore.closeWhenLaunched = checked
}
FormCard.FormDelegateSeparator {
above: closeAstraDelegate
below: showNewsDelegate
}
2023-08-19 10:49:00 -04:00
FormCard.FormCheckDelegate {
id: showNewsDelegate
2023-08-19 10:49:00 -04:00
text: i18n("Enable and show news")
checked: LauncherCore.showNews
onCheckedChanged: LauncherCore.showNews = checked
}
FormCard.FormDelegateSeparator {
above: showNewsDelegate
below: showDevToolsDelegate
}
FormCard.FormCheckDelegate {
id: showDevToolsDelegate
text: i18n("Show Developer Settings")
checked: LauncherCore.showDevTools
onCheckedChanged: LauncherCore.showDevTools = checked
}
}
}