Allow opening the settings from the welcome page

This is required to configure a proxy before logging in
This commit is contained in:
Tobias Fella
2024-03-08 14:02:50 +01:00
parent b488b55a71
commit 5ccce364d3
3 changed files with 13 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ import org.kde.neochat.config
FormCard.FormCardPage {
id: root
title: i18nc("@title:window", "General")
title: i18nc("@title:window", "Proxy")
property int currentType
property bool proxyConfigChanged: false

View File

@@ -11,7 +11,7 @@ import org.kde.neochat
KirigamiSettings.CategorizedSettings {
id: root
required property NeoChatConnection connection
property NeoChatConnection connection
objectName: "settingsPage"
actions: [

View File

@@ -211,6 +211,17 @@ FormCard.FormCardPage {
}
}
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Open proxy settings")
icon.name: "settings-configure"
onClicked: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "NetworkProxyPage.qml"), {}, {
title: i18nc("@title:window", "Proxy Settings")
});
}
}
Component.onCompleted: {
LoginHelper.init();
module.item.forceActiveFocus();