mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-15 00:55:22 +00:00
2275fe4f1f
Adding types instead of var for stores used in qml components Closes: #14801
29 lines
1.0 KiB
QML
29 lines
1.0 KiB
QML
import QtQuick 2.15
|
|
|
|
QtObject {
|
|
property QtObject privacyModule: QtObject {
|
|
signal passwordChanged(success: bool, errorMsg: string)
|
|
signal storeToKeychainError(errorDescription: string)
|
|
signal storeToKeychainSuccess()
|
|
}
|
|
|
|
function tryStoreToKeyChain(errorDescription) {
|
|
if (generateMacKeyChainStoreError.checked) {
|
|
privacyModule.storeToKeychainError(errorDescription)
|
|
} else {
|
|
passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.store
|
|
privacyModule.storeToKeychainSuccess()
|
|
privacyModule.passwordChanged(true, "")
|
|
}
|
|
}
|
|
|
|
function tryRemoveFromKeyChain() {
|
|
if (generateMacKeyChainStoreError.checked) {
|
|
privacyModule.storeToKeychainError("Error removing from keychain")
|
|
} else {
|
|
passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.notNow
|
|
privacyModule.storeToKeychainSuccess()
|
|
}
|
|
}
|
|
}
|