2019-12-19 07:46:16 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-12-07 09:38:36 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import "../../Base"
|
|
|
|
|
2020-07-24 01:30:35 -04:00
|
|
|
HSwipeView {
|
|
|
|
id: swipeView
|
|
|
|
clip: true
|
|
|
|
interactive: currentIndex !== 0 || signIn.serverUrl
|
|
|
|
onCurrentItemChanged: if (currentIndex === 0) serverBrowser.takeFocus()
|
|
|
|
Component.onCompleted: serverBrowser.takeFocus()
|
|
|
|
|
|
|
|
HPage {
|
|
|
|
id: serverPage
|
|
|
|
|
|
|
|
ServerBrowser {
|
|
|
|
id: serverBrowser
|
|
|
|
anchors.centerIn: parent
|
|
|
|
width: Math.min(implicitWidth, serverPage.availableWidth)
|
|
|
|
height: Math.min(implicitHeight, serverPage.availableHeight)
|
|
|
|
onAccepted: swipeView.currentIndex = 1
|
2020-06-25 08:32:08 -04:00
|
|
|
}
|
2020-07-24 01:30:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
HPage {
|
|
|
|
id: tabPage
|
2020-06-25 08:32:08 -04:00
|
|
|
|
2020-07-24 01:30:35 -04:00
|
|
|
HTabbedBox {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
width: Math.min(implicitWidth, tabPage.availableWidth)
|
|
|
|
height: Math.min(implicitHeight, tabPage.availableHeight)
|
|
|
|
|
|
|
|
header: HTabBar {
|
|
|
|
HTabButton { text: qsTr("Sign in") }
|
|
|
|
HTabButton { text: qsTr("Register") }
|
|
|
|
HTabButton { text: qsTr("Reset") }
|
|
|
|
}
|
|
|
|
|
|
|
|
SignIn {
|
|
|
|
id: signIn
|
|
|
|
serverUrl: serverBrowser.acceptedUrl
|
|
|
|
displayUrl: serverBrowser.acceptedUserUrl
|
|
|
|
onExitRequested: swipeView.currentIndex = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
Register {}
|
|
|
|
Reset {}
|
|
|
|
}
|
2019-12-07 09:38:36 -04:00
|
|
|
}
|
|
|
|
}
|