2021-07-21 16:08:15 -04:00
import QtQuick 2.10
import QtQuick . Controls 2.3
import QtGraphicalEffects 1.0
import QtQuick . Shapes 1.0
Rectangle {
id: serverSelect
2022-08-15 13:36:34 -04:00
color: myPalette . window
2021-07-21 16:08:15 -04:00
Rectangle {
width: 700
height: parent . height
anchors.horizontalCenter: parent . horizontalCenter
color: "transparent"
BackButton {
id: backButton
anchors.top: parent . top
anchors.topMargin: 15
anchors.right: parent . right
}
Rectangle {
width: parent . width
height: 300
anchors.verticalCenter: parent . verticalCenter
color: "transparent"
Text {
id: whatIsHeader
anchors.top: parent . top
text: "What is a homeserver?"
font.pointSize: 11
font.bold: true
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: whatIsDesc
width: parent . width
anchors.top: whatIsHeader . bottom
text: "Your homeserver is where you login and register your account. Your homeserver also makes up the second part of your user id: username@<homeserver url>."
wrapMode: Text . WordWrap
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: canIHeader
anchors.top: whatIsDesc . bottom
anchors.topMargin: 10
text: "Can I only join rooms on my homeserver?"
font.pointSize: 11
font.bold: true
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: canIDesc
width: parent . width
anchors.top: canIHeader . bottom
text: "You are not limited to rooms that exist on your homeserver, you can join any other public server's rooms from any homeserver."
wrapMode: Text . WordWrap
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: whatIfHeader
anchors.top: canIDesc . bottom
anchors.topMargin: 10
text: "What if I don't like my homeserver?"
font.pointSize: 11
font.bold: true
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: whatIfDesc
width: parent . width
anchors.top: whatIfHeader . bottom
text: "Simply don't use that server's account anymore. The homeserver may even have an option to delete your account."
wrapMode: Text . WordWrap
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: whatHomeHeader
anchors.top: whatIfDesc . bottom
anchors.topMargin: 10
text: "What homeserver should I choose?"
font.pointSize: 11
font.bold: true
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Text {
id: whatHomeDesc
width: parent . width
anchors.top: whatHomeHeader . bottom
text: "Since you can join any publicly accessible room from any homeserver, its mostly up to personal preference. If you don't like any server that's out there, you can always run your own."
wrapMode: Text . WordWrap
2022-08-15 13:36:34 -04:00
color: myPalette . text
2021-07-21 16:08:15 -04:00
}
Rectangle {
anchors.top: whatHomeDesc . bottom
anchors.topMargin: 25
height: 30
width: parent . width
color: "transparent"
TextField {
id: urlField
width: parent . width - changeButton . width
placeholderText: "matrix.org"
Component.onCompleted: text = matrix . homeserverURL
}
Button {
id: changeButton
anchors.left: urlField . right
text: "Change"
onClicked: matrix . setHomeserver ( urlField . text )
}
}
}
}
Connections {
target: matrix
onHomeserverChanged: {
if ( valid ) {
stack . pop ( )
} else {
showDialog ( "Error while connecting to homeserver" , description )
}
}
}
}