2019-11-07 09:50:59 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import "../../Base"
|
2019-11-07 11:23:47 -04:00
|
|
|
import "../../utils.js" as Utils
|
2019-11-07 09:50:59 -04:00
|
|
|
|
|
|
|
HPage {
|
2019-11-07 11:08:47 -04:00
|
|
|
id: addChatPage
|
2019-11-09 14:20:53 -04:00
|
|
|
onFocusChanged: findSomeone.forceActiveFocus()
|
2019-11-07 09:50:59 -04:00
|
|
|
|
2019-11-07 11:08:47 -04:00
|
|
|
|
|
|
|
property string userId
|
|
|
|
|
2019-11-09 15:19:10 -04:00
|
|
|
readonly property var account:
|
|
|
|
Utils.getItem(modelSources["Account"] || [], "user_id", userId)
|
|
|
|
|
2019-11-07 11:08:47 -04:00
|
|
|
|
2019-11-07 10:41:10 -04:00
|
|
|
HColumnLayout {
|
2019-11-07 09:50:59 -04:00
|
|
|
Layout.alignment: Qt.AlignCenter
|
2019-11-07 10:41:10 -04:00
|
|
|
Layout.minimumWidth: Layout.maximumWidth
|
2019-11-08 10:31:07 -04:00
|
|
|
Layout.maximumWidth: Math.min(
|
|
|
|
parent.width,
|
|
|
|
Math.max(tabBar.contentWidth, swipeView.contentWidth),
|
|
|
|
)
|
2019-11-07 09:50:59 -04:00
|
|
|
|
2019-11-07 11:23:47 -04:00
|
|
|
HTabBar {
|
2019-11-07 09:50:59 -04:00
|
|
|
id: tabBar
|
2019-11-09 14:20:53 -04:00
|
|
|
currentIndex: 0
|
2019-11-10 09:28:57 -04:00
|
|
|
Component.onCompleted: shortcuts.tabsTarget = this
|
2019-11-07 09:50:59 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: [
|
|
|
|
qsTr("Find someone"),
|
|
|
|
qsTr("Join room"),
|
2019-11-07 11:11:09 -04:00
|
|
|
qsTr("Create room"),
|
2019-11-07 09:50:59 -04:00
|
|
|
]
|
|
|
|
|
2019-11-07 10:41:10 -04:00
|
|
|
HTabButton {
|
2019-11-07 09:50:59 -04:00
|
|
|
text: modelData
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SwipeView {
|
2019-11-07 10:41:10 -04:00
|
|
|
id: swipeView
|
2019-11-07 09:50:59 -04:00
|
|
|
clip: true
|
|
|
|
currentIndex: tabBar.currentIndex
|
2019-11-07 11:39:43 -04:00
|
|
|
interactive: false
|
2019-11-07 09:50:59 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2019-11-09 14:20:53 -04:00
|
|
|
FindSomeone { id: findSomeone }
|
2019-11-09 09:52:16 -04:00
|
|
|
JoinRoom {}
|
2019-11-09 14:20:53 -04:00
|
|
|
CreateRoom {}
|
2019-11-07 09:50:59 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|