mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 10:29:24 +00:00
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
// =============================================================================
|
|
// `SettingsSipAccounts.qml` Logic.
|
|
// =============================================================================
|
|
|
|
.import Linphone 1.0 as Linphone
|
|
|
|
.import 'qrc:/ui/scripts/Utils/utils.js' as Utils
|
|
|
|
// =============================================================================
|
|
|
|
function editAccount (account) {
|
|
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/SettingsSipAccountsEdit.qml'), {
|
|
account: account
|
|
})
|
|
}
|
|
|
|
function deleteAccount (account) {
|
|
window.attachVirtualWindow(Utils.buildDialogUri('ConfirmDialog'), {
|
|
descriptionText: qsTr('deleteAccountDescription'),
|
|
}, function (status) {
|
|
if (status) {
|
|
Linphone.AccountSettingsModel.removeProxyConfig(account.proxyConfig)
|
|
}
|
|
})
|
|
}
|
|
|
|
function eraseAllPasswords () {
|
|
window.attachVirtualWindow(Utils.buildDialogUri('ConfirmDialog'), {
|
|
descriptionText: qsTr('eraseAllPasswordsDescription'),
|
|
}, function (status) {
|
|
if (status) {
|
|
Linphone.AccountSettingsModel.eraseAllPasswords()
|
|
}
|
|
})
|
|
}
|