2022-03-07 20:34:59 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var privacyModule
|
|
|
|
property var syncModule
|
2022-08-02 18:37:27 +00:00
|
|
|
property var wakuModule
|
2022-03-07 20:34:59 +00:00
|
|
|
|
|
|
|
property var mailservers: syncModule.model
|
2022-08-02 18:37:27 +00:00
|
|
|
property var wakunodes: wakuModule.model
|
2022-03-07 20:34:59 +00:00
|
|
|
|
2022-03-29 12:04:56 +00:00
|
|
|
property bool useMailservers: syncModule.useMailservers
|
|
|
|
|
|
|
|
function toggleUseMailservers(value) {
|
|
|
|
root.syncModule.useMailservers = value
|
|
|
|
}
|
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
// Module Properties
|
|
|
|
property bool automaticMailserverSelection: syncModule.automaticSelection
|
|
|
|
property string activeMailserver: syncModule.activeMailserver
|
|
|
|
|
|
|
|
function getMailserverNameForNodeAddress(nodeAddress) {
|
|
|
|
return root.syncModule.getMailserverNameForNodeAddress(nodeAddress)
|
|
|
|
}
|
|
|
|
|
2022-10-24 14:34:59 +00:00
|
|
|
function setActiveMailserver(mailserverID) {
|
|
|
|
root.syncModule.setActiveMailserver(mailserverID)
|
2022-03-07 20:34:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function saveNewMailserver(name, nodeAddress) {
|
|
|
|
root.syncModule.saveNewMailserver(name, nodeAddress)
|
|
|
|
}
|
|
|
|
|
2022-08-02 18:37:27 +00:00
|
|
|
function saveNewWakuNode(nodeAddress) {
|
|
|
|
root.wakuModule.saveNewWakuNode(nodeAddress)
|
|
|
|
}
|
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
function enableAutomaticMailserverSelection(checked) {
|
|
|
|
if (automaticMailserverSelection === checked) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
root.syncModule.enableAutomaticSelection(checked)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getLinkPreviewWhitelist() {
|
|
|
|
return root.privacyModule.getLinkPreviewWhitelist()
|
|
|
|
}
|
|
|
|
}
|