Port ExploreComponent actions to pageStack.pushDialogLayer
This commit is contained in:
@@ -8,14 +8,14 @@ import org.kde.kirigami 2.15 as Kirigami
|
||||
|
||||
import org.kde.neochat 1.0
|
||||
|
||||
Kirigami.OverlaySheet {
|
||||
Kirigami.ScrollablePage {
|
||||
id: root
|
||||
|
||||
parent: applicationWindow().overlay
|
||||
|
||||
title: i18n("Create a Room")
|
||||
|
||||
contentItem: Kirigami.FormLayout {
|
||||
Kirigami.FormLayout {
|
||||
QQC2.TextField {
|
||||
id: roomNameField
|
||||
Kirigami.FormData.label: i18n("Room name:")
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.neochat 1.0
|
||||
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
|
||||
|
||||
Kirigami.OverlaySheet {
|
||||
Kirigami.ScrollablePage {
|
||||
id: root
|
||||
|
||||
title: i18n("Create a Space")
|
||||
|
||||
@@ -19,20 +19,19 @@ RowLayout {
|
||||
text: i18n("Explore rooms")
|
||||
icon.name: "compass"
|
||||
onTriggered: {
|
||||
applicationWindow().pushReplaceLayer("qrc:/JoinRoomPage.qml", {connection: Controller.activeConnection})
|
||||
pageStack.pushDialogLayer("qrc:/JoinRoomPage.qml", {connection: Controller.activeConnection}, {title: i18nc("@title", "Explore Rooms")})
|
||||
}
|
||||
}
|
||||
property Kirigami.Action chatAction: Kirigami.Action {
|
||||
text: i18n("Start a Chat")
|
||||
icon.name: "list-add-user"
|
||||
onTriggered: applicationWindow().pushReplaceLayer("qrc:/StartChatPage.qml", {connection: Controller.activeConnection})
|
||||
onTriggered: pageStack.pushDialogLayer("qrc:/StartChatPage.qml", {connection: Controller.activeConnection}, {title: i18nc("@title", "Start a Chat")})
|
||||
}
|
||||
property Kirigami.Action roomAction: Kirigami.Action {
|
||||
text: i18n("Create a Room")
|
||||
icon.name: "system-users"
|
||||
onTriggered: {
|
||||
let dialog = createRoomDialog.createObject(root.overlay);
|
||||
dialog.open();
|
||||
pageStack.pushDialogLayer("qrc:/CreateRoomDialog.qml", {}, {title: i18nc("@title", "Create a Room")})
|
||||
}
|
||||
shortcut: StandardKey.New
|
||||
}
|
||||
@@ -40,8 +39,7 @@ RowLayout {
|
||||
text: i18n("Create a Space")
|
||||
icon.name: "list-add"
|
||||
onTriggered: {
|
||||
let dialog = createSpaceDialog.createObject(root.overlay);
|
||||
dialog.open()
|
||||
pageStack.pushDialogLayer("qrc:/CreateSpaceDialog.qml", {}, {title: i18nc("@title", "Create a Space")})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user