mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
parent
7a89781c38
commit
2a27aa17a7
@ -69,4 +69,4 @@ method setProfilePicturesVisibility*(self: AccessInterface, value: int) {.base.}
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method getPasswordStrengthScore*(self: AccessInterface, password: string): int {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
raise newException(ValueError, "No implementation available")
|
@ -98,4 +98,4 @@ method setProfilePicturesVisibility*(self: Module, value: int) =
|
||||
self.view.profilePicturesVisibilityChanged()
|
||||
|
||||
method getPasswordStrengthScore*(self: Module, password: string): int =
|
||||
return self.controller.getPasswordStrengthScore(password, singletonInstance.userProfile.getUsername())
|
||||
return self.controller.getPasswordStrengthScore(password, singletonInstance.userProfile.getUsername())
|
@ -82,4 +82,4 @@ QtObject:
|
||||
self.delegate.setProfilePicturesVisibility(value)
|
||||
|
||||
proc getPasswordStrengthScore*(self: View, password: string): int {.slot.} =
|
||||
return self.delegate.getPasswordStrengthScore(password)
|
||||
return self.delegate.getPasswordStrengthScore(password)
|
@ -50,3 +50,9 @@ proc saveNewMailserver*(self: Controller, name: string, nodeAddress: string) =
|
||||
|
||||
proc enableAutomaticSelection*(self: Controller, value: bool) =
|
||||
self.mailserversService.enableAutomaticSelection(value)
|
||||
|
||||
method getUseMailservers*(self: Controller): bool =
|
||||
return self.settingsService.getUseMailservers()
|
||||
|
||||
method setUseMailservers*(self: Controller, value: bool): bool =
|
||||
return self.settingsService.saveUseMailservers(value)
|
@ -35,3 +35,9 @@ method saveNewMailserver*(self: AccessInterface, name: string, nodeAddress: stri
|
||||
|
||||
method enableAutomaticSelection*(self: AccessInterface, value: bool) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method getUseMailservers*(self: AccessInterface): bool {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method setUseMailservers*(self: AccessInterface, value: bool) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
@ -83,3 +83,10 @@ method saveNewMailserver*(self: Module, name: string, nodeAddress: string) =
|
||||
|
||||
method enableAutomaticSelection*(self: Module, value: bool) =
|
||||
self.controller.enableAutomaticSelection(value)
|
||||
|
||||
method getUseMailservers*(self: Module): bool =
|
||||
return self.controller.getUseMailservers()
|
||||
|
||||
method setUseMailservers*(self: Module, value: bool) =
|
||||
if (self.controller.setUseMailservers(value)):
|
||||
self.view.useMailserversChanged()
|
||||
|
@ -64,3 +64,13 @@ QtObject:
|
||||
|
||||
proc enableAutomaticSelection(self: View, value: bool) {.slot.} =
|
||||
self.delegate.enableAutomaticSelection(value)
|
||||
|
||||
proc useMailserversChanged*(self: View) {.signal.}
|
||||
proc getUseMailservers*(self: View): bool {.slot.} =
|
||||
return self.delegate.getUseMailservers()
|
||||
QtProperty[bool] useMailservers:
|
||||
read = getUseMailservers
|
||||
notify = useMailserversChanged
|
||||
|
||||
proc setUseMailservers*(self: View, value: bool) {.slot.} =
|
||||
self.delegate.setUseMailservers(value)
|
||||
|
@ -45,20 +45,22 @@ StatusModal {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
|
||||
// TODO re-add that when the status-go API to disconnect from the mailserver is added
|
||||
// StatusListItem {
|
||||
// anchors.left: parent.left
|
||||
// anchors.leftMargin: -Style.current.padding
|
||||
// anchors.right: parent.right
|
||||
// anchors.rightMargin: -Style.current.padding
|
||||
// title: qsTr("Use Waku nodes")
|
||||
// components: [
|
||||
// StatusSwitch {
|
||||
// // TODO find what this is
|
||||
// checked: true
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
StatusListItem {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: -Style.current.padding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: -Style.current.padding
|
||||
title: qsTr("Use Waku nodes")
|
||||
components: [
|
||||
StatusSwitch {
|
||||
checked: root.messagingStore.useMailservers
|
||||
onCheckedChanged: root.messagingStore.toggleUseMailservers(checked)
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
root.messagingStore.toggleUseMailservers(!root.messagingStore.useMailservers)
|
||||
}
|
||||
}
|
||||
|
||||
Separator {
|
||||
anchors.left: parent.left
|
||||
|
@ -17,6 +17,12 @@ QtObject {
|
||||
|
||||
property var mailservers: syncModule.model
|
||||
|
||||
property bool useMailservers: syncModule.useMailservers
|
||||
|
||||
function toggleUseMailservers(value) {
|
||||
root.syncModule.useMailservers = value
|
||||
}
|
||||
|
||||
// Module Properties
|
||||
property bool automaticMailserverSelection: syncModule.automaticSelection
|
||||
property string activeMailserver: syncModule.activeMailserver
|
||||
|
Loading…
x
Reference in New Issue
Block a user