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
|
import org.kde.neochat 1.0
|
||||||
|
|
||||||
Kirigami.OverlaySheet {
|
Kirigami.ScrollablePage {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
parent: applicationWindow().overlay
|
||||||
|
|
||||||
title: i18n("Create a Room")
|
title: i18n("Create a Room")
|
||||||
|
|
||||||
contentItem: Kirigami.FormLayout {
|
Kirigami.FormLayout {
|
||||||
QQC2.TextField {
|
QQC2.TextField {
|
||||||
id: roomNameField
|
id: roomNameField
|
||||||
Kirigami.FormData.label: i18n("Room name:")
|
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.neochat 1.0
|
||||||
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
|
import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm
|
||||||
|
|
||||||
Kirigami.OverlaySheet {
|
Kirigami.ScrollablePage {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
title: i18n("Create a Space")
|
title: i18n("Create a Space")
|
||||||
|
|||||||
@@ -19,20 +19,19 @@ RowLayout {
|
|||||||
text: i18n("Explore rooms")
|
text: i18n("Explore rooms")
|
||||||
icon.name: "compass"
|
icon.name: "compass"
|
||||||
onTriggered: {
|
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 {
|
property Kirigami.Action chatAction: Kirigami.Action {
|
||||||
text: i18n("Start a Chat")
|
text: i18n("Start a Chat")
|
||||||
icon.name: "list-add-user"
|
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 {
|
property Kirigami.Action roomAction: Kirigami.Action {
|
||||||
text: i18n("Create a Room")
|
text: i18n("Create a Room")
|
||||||
icon.name: "system-users"
|
icon.name: "system-users"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = createRoomDialog.createObject(root.overlay);
|
pageStack.pushDialogLayer("qrc:/CreateRoomDialog.qml", {}, {title: i18nc("@title", "Create a Room")})
|
||||||
dialog.open();
|
|
||||||
}
|
}
|
||||||
shortcut: StandardKey.New
|
shortcut: StandardKey.New
|
||||||
}
|
}
|
||||||
@@ -40,8 +39,7 @@ RowLayout {
|
|||||||
text: i18n("Create a Space")
|
text: i18n("Create a Space")
|
||||||
icon.name: "list-add"
|
icon.name: "list-add"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = createSpaceDialog.createObject(root.overlay);
|
pageStack.pushDialogLayer("qrc:/CreateSpaceDialog.qml", {}, {title: i18nc("@title", "Create a Space")})
|
||||||
dialog.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user