mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 20:47:45 +00:00
Move auto-login setting to the profiles page
It makes more sense to be put here because you select which profile to login with.
This commit is contained in:
parent
e8a2e085ed
commit
becb5b9289
2 changed files with 41 additions and 37 deletions
|
@ -21,43 +21,6 @@ FormCard.FormCardPage {
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
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 {}
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
FormCard.FormCheckDelegate {
|
||||||
id: closeAstraDelegate
|
id: closeAstraDelegate
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ pragma ComponentBehavior: Bound
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kirigamiaddons.formcard as FormCard
|
import org.kde.kirigamiaddons.formcard as FormCard
|
||||||
|
@ -28,6 +29,46 @@ FormCard.FormCardPage {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
FormCard.FormCard {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
|
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.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
|
Loading…
Add table
Reference in a new issue