Improve welcome page
- Don't use card for welcome message and instead use same layout as kwordquiz - Add separator between login and register button - Add type annotation in functions
This commit is contained in:
committed by
Tobias Fella
parent
197ff984fd
commit
624578ec77
@@ -21,6 +21,8 @@ LoginStep {
|
||||
onClicked: root.processed("qrc:/org/kde/neochat/qml/Login.qml")
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {}
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
text: i18nc("@action:button", "Register")
|
||||
onClicked: root.processed("qrc:/org/kde/neochat/qml/Homeserver.qml")
|
||||
|
||||
@@ -32,23 +32,20 @@ FormCard.FormCardPage {
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormCard {
|
||||
id: contentCard
|
||||
Kirigami.Icon {
|
||||
source: "org.kde.neochat"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
implicitWidth: Math.round(Kirigami.Units.iconSizes.huge * 1.5)
|
||||
implicitHeight: Math.round(Kirigami.Units.iconSizes.huge * 1.5)
|
||||
}
|
||||
|
||||
FormCard.AbstractFormDelegate {
|
||||
contentItem: Kirigami.Icon {
|
||||
source: "org.kde.neochat"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 16
|
||||
}
|
||||
background: Item {}
|
||||
onActiveFocusChanged: if (activeFocus) module.item.forceActiveFocus()
|
||||
}
|
||||
Kirigami.Heading {
|
||||
id: welcomeMessage
|
||||
|
||||
FormCard.FormTextDelegate {
|
||||
id: welcomeMessage
|
||||
text: i18n("Welcome to NeoChat")
|
||||
}
|
||||
text: i18n("Welcome to NeoChat")
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||
}
|
||||
|
||||
FormCard.FormHeader {
|
||||
@@ -83,6 +80,7 @@ FormCard.FormCardPage {
|
||||
FormCard.FormHeader {
|
||||
title: i18nc("@title", "Log in or Create a New Account")
|
||||
}
|
||||
|
||||
FormCard.FormCard {
|
||||
Loader {
|
||||
id: module
|
||||
@@ -93,7 +91,7 @@ FormCard.FormCardPage {
|
||||
id: stepConnections
|
||||
target: currentStep
|
||||
|
||||
function onProcessed(nextUrl) {
|
||||
function onProcessed(nextUrl: string): void {
|
||||
module.source = nextUrl;
|
||||
headerMessage.text = "";
|
||||
headerMessage.visible = false;
|
||||
@@ -103,19 +101,23 @@ FormCard.FormCardPage {
|
||||
continueButton.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
function onShowMessage(message) {
|
||||
|
||||
function onShowMessage(message: string): void {
|
||||
headerMessage.text = message;
|
||||
headerMessage.visible = true;
|
||||
headerMessage.type = Kirigami.MessageType.Information;
|
||||
}
|
||||
function onClearError() {
|
||||
|
||||
function onClearError(): void {
|
||||
headerMessage.text = "";
|
||||
headerMessage.visible = false;
|
||||
}
|
||||
function onCloseDialog() {
|
||||
|
||||
function onCloseDialog(): void {
|
||||
root.closeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Registration
|
||||
function onNextStepChanged() {
|
||||
|
||||
Reference in New Issue
Block a user