Port CreateSpaceDialog to FormCard

This commit is contained in:
Tobias Fella
2023-09-01 18:11:38 +02:00
parent 87745c360d
commit 5871903529

View File

@@ -6,30 +6,28 @@ import QtQuick.Layouts 1.15
import org.kde.kirigami 2.20 as Kirigami import org.kde.kirigami 2.20 as Kirigami
import org.kde.neochat 1.0 import org.kde.neochat 1.0
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm import org.kde.kirigamiaddons.formcard 1.0 as FormCard
Kirigami.ScrollablePage { FormCard.FormCardPage {
id: root id: root
title: i18n("Create a Space") title: i18n("Create a Space")
Kirigami.Theme.colorSet: Kirigami.Theme.Window Kirigami.Theme.colorSet: Kirigami.Theme.Window
MobileForm.FormCard { FormCard.FormHeader {
contentItem: ColumnLayout {
spacing: 0
MobileForm.FormCardHeader {
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")
} }
MobileForm.FormTextFieldDelegate { FormCard.FormCard {
FormCard.FormTextFieldDelegate {
id: nameDelegate id: nameDelegate
label: i18n("Space name") label: i18n("Space name")
} }
MobileForm.FormTextFieldDelegate { FormCard.FormTextFieldDelegate {
id: topicDelegate id: topicDelegate
label: i18n("Space topic (optional)") label: i18n("Space topic (optional)")
} }
MobileForm.FormButtonDelegate { FormCard.FormButtonDelegate {
text: i18n("Create space") text: i18n("Create space")
onClicked: { onClicked: {
Controller.createSpace(nameDelegate.text, topicDelegate.text) Controller.createSpace(nameDelegate.text, topicDelegate.text)
@@ -40,4 +38,3 @@ Kirigami.ScrollablePage {
} }
} }
} }
}