Improve the structure of the welcome page slightly

I don't really like these pages in NeoChat much, there's only a few
buttons, and they really blend together. In an attempt to alleviate
this problem, I did the following:

* Added icons to the Login and Register actions, which does complement
the other buttons on this page.
* Removed the icons from the "Continue" and "Go back" buttons, which did
nothing but add confusing arrows.
* Moved the "Go back" button, fixed the capitalization and moved it to a
separate FormCard.
* Made it so the "Settings" button is only shown on the initial page, to
reduce the amount of UI clutter while logging in.
This commit is contained in:
Joshua Goins
2026-01-29 15:33:34 +01:00
parent 295ecf0f18
commit 853d48e768
2 changed files with 17 additions and 11 deletions

View File

@@ -21,6 +21,7 @@ LoginStep {
FormCard.FormButtonDelegate {
id: loginButton
icon.name: "user-symbolic"
text: i18nc("@action:button", "Login")
onClicked: root.processed("Login")
}
@@ -28,6 +29,7 @@ LoginStep {
FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate {
icon.name: "network-server-symbolic"
text: i18nc("@action:button", "Register")
onClicked: root.processed("Homeserver")
}

View File

@@ -19,7 +19,7 @@ Kirigami.Page {
property bool showExisting: false
property bool _showExisting: showExisting && root.currentStepString === root.initialStep
property bool showSettings: true
property bool showSettings: _showExisting
property alias currentStep: module.item
property string currentStepString: initialStep
property string initialStep: "LoginRegister"
@@ -245,6 +245,7 @@ Kirigami.Page {
}
FormCard.FormDelegateSeparator {
above: null // Set this manually so KA doesn't decide to pick another unrelated delegate
below: continueButton
visible: (root.currentStep as LoginStep).nextAction
}
@@ -254,28 +255,31 @@ Kirigami.Page {
text: (root.currentStep as LoginStep).nextAction && (root.currentStep as LoginStep).nextAction.text ? (root.currentStep as LoginStep).nextAction.text : i18nc("@action:button", "Continue")
visible: (root.currentStep as LoginStep).nextAction
onClicked: (root.currentStep as LoginStep).nextAction.trigger()
icon.name: "arrow-right-symbolic"
enabled: (root.currentStep as LoginStep).nextAction ? (root.currentStep as LoginStep).nextAction.enabled : false
}
FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Go back")
visible: (root.currentStep as LoginStep).previousAction
onClicked: (root.currentStep as LoginStep).previousAction.trigger()
icon.name: "arrow-left-symbolic"
enabled: (root.currentStep as LoginStep).previousAction ? (root.currentStep as LoginStep).previousAction.enabled : false
}
}
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing * 2
maximumWidth: Kirigami.Units.gridUnit * 20
visible: root.showSettings
visible: root.showSettings || previousButtonDelegate.visible
FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Settings")
icon.name: "settings-configure"
visible: root.showSettings
onClicked: NeoChatSettingsView.open()
}
FormCard.FormButtonDelegate {
id: previousButtonDelegate
text: i18nc("@action:button", "Go Back")
visible: (root.currentStep as LoginStep).previousAction
onClicked: (root.currentStep as LoginStep).previousAction.trigger()
enabled: (root.currentStep as LoginStep).previousAction ? (root.currentStep as LoginStep).previousAction.enabled : false
trailingLogo.direction: Qt.LeftArrow
}
}
}
}