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:
@@ -21,6 +21,7 @@ LoginStep {
|
|||||||
|
|
||||||
FormCard.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
id: loginButton
|
id: loginButton
|
||||||
|
icon.name: "user-symbolic"
|
||||||
text: i18nc("@action:button", "Login")
|
text: i18nc("@action:button", "Login")
|
||||||
onClicked: root.processed("Login")
|
onClicked: root.processed("Login")
|
||||||
}
|
}
|
||||||
@@ -28,6 +29,7 @@ LoginStep {
|
|||||||
FormCard.FormDelegateSeparator {}
|
FormCard.FormDelegateSeparator {}
|
||||||
|
|
||||||
FormCard.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
|
icon.name: "network-server-symbolic"
|
||||||
text: i18nc("@action:button", "Register")
|
text: i18nc("@action:button", "Register")
|
||||||
onClicked: root.processed("Homeserver")
|
onClicked: root.processed("Homeserver")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Kirigami.Page {
|
|||||||
|
|
||||||
property bool showExisting: false
|
property bool showExisting: false
|
||||||
property bool _showExisting: showExisting && root.currentStepString === root.initialStep
|
property bool _showExisting: showExisting && root.currentStepString === root.initialStep
|
||||||
property bool showSettings: true
|
property bool showSettings: _showExisting
|
||||||
property alias currentStep: module.item
|
property alias currentStep: module.item
|
||||||
property string currentStepString: initialStep
|
property string currentStepString: initialStep
|
||||||
property string initialStep: "LoginRegister"
|
property string initialStep: "LoginRegister"
|
||||||
@@ -245,6 +245,7 @@ Kirigami.Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator {
|
FormCard.FormDelegateSeparator {
|
||||||
|
above: null // Set this manually so KA doesn't decide to pick another unrelated delegate
|
||||||
below: continueButton
|
below: continueButton
|
||||||
visible: (root.currentStep as LoginStep).nextAction
|
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")
|
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
|
visible: (root.currentStep as LoginStep).nextAction
|
||||||
onClicked: (root.currentStep as LoginStep).nextAction.trigger()
|
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
|
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 {
|
FormCard.FormCard {
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing * 2
|
Layout.topMargin: Kirigami.Units.largeSpacing * 2
|
||||||
maximumWidth: Kirigami.Units.gridUnit * 20
|
maximumWidth: Kirigami.Units.gridUnit * 20
|
||||||
visible: root.showSettings
|
visible: root.showSettings || previousButtonDelegate.visible
|
||||||
|
|
||||||
FormCard.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
text: i18nc("@action:button", "Settings")
|
text: i18nc("@action:button", "Settings")
|
||||||
icon.name: "settings-configure"
|
icon.name: "settings-configure"
|
||||||
|
visible: root.showSettings
|
||||||
onClicked: NeoChatSettingsView.open()
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user