2019-01-26 22:54:08 +00:00
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.4
|
|
|
|
import QtQuick.Controls.Material 2.0
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
|
|
|
|
import "../widgets"
|
|
|
|
import "../overlays"
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
2019-02-02 00:12:44 +00:00
|
|
|
property alias title: toolbar.text
|
2019-02-14 02:42:13 +00:00
|
|
|
id: overlay
|
|
|
|
property string name
|
|
|
|
property bool accepted
|
2019-01-26 22:54:08 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
|
2019-01-26 22:54:08 +00:00
|
|
|
StackToolbar {
|
2019-02-02 00:12:44 +00:00
|
|
|
id: toolbar
|
2019-03-05 22:02:29 +00:00
|
|
|
|
2019-03-06 19:38:08 +00:00
|
|
|
membership.visible: gcd.currentOpenConversation.length == 32
|
|
|
|
|
|
|
|
membership.onClicked: overlayStack.overlay = overlayStack.membershipOverlay
|
2019-01-26 22:54:08 +00:00
|
|
|
|
|
|
|
aux.onClicked: {
|
2019-02-05 00:41:18 +00:00
|
|
|
if (gcd.currentOpenConversation.length == 32) {
|
|
|
|
theStack.pane = theStack.groupProfilePane
|
2019-02-14 02:42:13 +00:00
|
|
|
gcd.requestGroupSettings(gcd.currentOpenConversation)
|
2019-02-05 00:41:18 +00:00
|
|
|
} else {
|
|
|
|
theStack.pane = theStack.userProfilePane
|
|
|
|
gcd.requestPeerSettings()
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
}
|
2019-02-27 22:44:37 +00:00
|
|
|
back.visible: true
|
2019-01-26 22:54:08 +00:00
|
|
|
}
|
|
|
|
|
2019-02-14 02:42:13 +00:00
|
|
|
RowLayout {
|
2019-02-14 17:54:15 +00:00
|
|
|
visible:!overlay.accepted && (gcd.currentOpenConversation.length == 32)
|
2019-03-05 22:02:29 +00:00
|
|
|
|
|
|
|
|
2019-02-14 02:42:13 +00:00
|
|
|
Text {
|
|
|
|
text: "Do you want to accept the invitation to " + overlay.name + "?"
|
|
|
|
}
|
2019-03-05 22:02:29 +00:00
|
|
|
|
2019-02-14 02:42:13 +00:00
|
|
|
SimpleButton {
|
|
|
|
text: "Accept"
|
|
|
|
icon: "regular/heart"
|
|
|
|
onClicked: {
|
|
|
|
gcd.acceptGroup(gcd.currentOpenConversation)
|
|
|
|
gcd.requestGroupSettings(gcd.currentOpenConversation)
|
|
|
|
}
|
|
|
|
}
|
2019-03-05 22:02:29 +00:00
|
|
|
|
2019-02-14 02:42:13 +00:00
|
|
|
SimpleButton {
|
|
|
|
text: "Reject"
|
|
|
|
icon: "regular/trash-alt"
|
|
|
|
onClicked: {
|
|
|
|
gcd.leaveGroup(gcd.currentOpenConversation)
|
|
|
|
theStack.pane = theStack.emptyPane
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-04 23:00:12 +00:00
|
|
|
RowLayout {
|
2019-01-26 22:54:08 +00:00
|
|
|
id: switcher
|
|
|
|
|
|
|
|
|
|
|
|
SimpleButton {
|
|
|
|
text: "Chat"
|
|
|
|
|
|
|
|
|
|
|
|
onClicked: overlayStack.overlay = overlayStack.chatOverlay
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleButton {
|
|
|
|
text: "Lists"
|
|
|
|
|
|
|
|
|
|
|
|
onClicked: overlayStack.overlay = overlayStack.listOverlay
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleButton {
|
|
|
|
text: "Bulletins"
|
|
|
|
|
|
|
|
|
|
|
|
onClicked: overlayStack.overlay = overlayStack.bulletinOverlay
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleButton {
|
2019-02-14 02:42:13 +00:00
|
|
|
text: "Puzzle Game"
|
2019-01-26 22:54:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
onClicked: overlayStack.overlay = overlayStack.game1Overlay
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
StackLayout {
|
|
|
|
id: overlayStack
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.top: switcher.bottom
|
2019-03-05 22:02:29 +00:00
|
|
|
implicitHeight: height
|
2019-01-26 22:54:08 +00:00
|
|
|
currentIndex: 0
|
|
|
|
|
|
|
|
property alias overlay: overlayStack.currentIndex
|
|
|
|
readonly property int chatOverlay: 0
|
|
|
|
readonly property int listOverlay: 1
|
|
|
|
readonly property int bulletinOverlay: 2
|
|
|
|
readonly property int game1Overlay: 3
|
2019-03-06 19:38:08 +00:00
|
|
|
readonly property int membershipOverlay: 4
|
2019-01-26 22:54:08 +00:00
|
|
|
|
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
ChatOverlay { //0
|
|
|
|
Layout.maximumHeight: overlayStack.height
|
|
|
|
Layout.maximumWidth: overlayStack.width
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
ListOverlay{ //1
|
|
|
|
Layout.maximumHeight: overlayStack.height
|
|
|
|
Layout.maximumWidth: overlayStack.width
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
BulletinOverlay{ //2
|
|
|
|
Layout.maximumHeight: overlayStack.height
|
|
|
|
Layout.maximumWidth: overlayStack.width
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
Game1Overlay{ //3
|
|
|
|
Layout.maximumHeight: overlayStack.height
|
|
|
|
Layout.maximumWidth: overlayStack.width
|
|
|
|
}
|
2019-03-06 19:38:08 +00:00
|
|
|
|
|
|
|
MembershipOverlay { //4
|
|
|
|
Layout.maximumHeight: overlayStack.height
|
|
|
|
Layout.maximumWidth: overlayStack.width
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
}
|
2019-02-14 02:42:13 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
Connections {
|
|
|
|
target: gcd
|
2019-02-14 02:42:13 +00:00
|
|
|
|
2019-03-06 19:38:08 +00:00
|
|
|
onResetMessagePane: function() {
|
|
|
|
overlayStack.overlay = overlayStack.chatOverlay
|
|
|
|
}
|
2019-03-05 22:02:29 +00:00
|
|
|
|
|
|
|
onSupplyGroupSettings: function(gid, name, server, invite, accepted, addrbooknames, addrbookaddrs) {
|
|
|
|
console.log("Supplied " + gid + " " + name + "Accepted " + accepted)
|
|
|
|
overlay.name = name
|
|
|
|
overlay.accepted = accepted
|
|
|
|
}
|
|
|
|
}
|
2019-01-26 22:54:08 +00:00
|
|
|
}
|