2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-27 17:28:25 -04:00
|
|
|
import "../../../../imports"
|
2020-06-19 14:06:58 -04:00
|
|
|
import "../../../../shared"
|
2020-09-17 17:55:09 +02:00
|
|
|
import "../../../../shared/status"
|
2020-05-27 17:28:25 -04:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: syncContainer
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2020-06-19 14:06:58 -04:00
|
|
|
StyledText {
|
2020-05-27 17:28:25 -04:00
|
|
|
id: element4
|
2020-07-06 16:39:55 -04:00
|
|
|
//% "Sync settings"
|
|
|
|
text: qsTrId("sync-settings")
|
2020-05-27 17:28:25 -04:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 20
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: mailserversList
|
2020-09-15 13:21:23 +02:00
|
|
|
|
2020-09-17 17:55:09 +02:00
|
|
|
StatusRadioButton {
|
|
|
|
text: name
|
2021-01-07 13:41:20 -04:00
|
|
|
checked: name == profileModel.mailservers.activeMailserver
|
|
|
|
onClicked: {
|
|
|
|
if (checked) {
|
|
|
|
profileModel.mailservers.setMailserver(name);
|
|
|
|
}
|
|
|
|
}
|
2020-05-27 17:28:25 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-07 13:41:20 -04:00
|
|
|
StatusSwitch {
|
|
|
|
id: automaticSelectionSwitch
|
|
|
|
checked: profileModel.mailservers.automaticSelection
|
|
|
|
onCheckedChanged: profileModel.mailservers.enableAutomaticSelection(checked)
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
text: profileModel.mailservers.activeMailserver || qsTr("...")
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element4.top
|
|
|
|
anchors.topMargin: 24
|
|
|
|
visible: automaticSelectionSwitch.checked
|
|
|
|
}
|
|
|
|
|
2020-05-27 17:28:25 -04:00
|
|
|
ListView {
|
|
|
|
id: mailServersListView
|
|
|
|
anchors.topMargin: 48
|
|
|
|
anchors.top: element4.bottom
|
|
|
|
anchors.fill: parent
|
2020-12-06 18:15:51 -04:00
|
|
|
model: profileModel.mailservers.list
|
2020-05-27 17:28:25 -04:00
|
|
|
delegate: mailserversList
|
2021-01-07 13:41:20 -04:00
|
|
|
visible: !automaticSelectionSwitch.checked
|
2020-05-27 17:28:25 -04:00
|
|
|
}
|
|
|
|
}
|