mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-18 20:08:11 +00:00
32 lines
997 B
JavaScript
32 lines
997 B
JavaScript
// =============================================================================
|
|
// `SettingsAdvanced.qml` Logic.
|
|
// =============================================================================
|
|
|
|
.import Linphone 1.0 as Linphone
|
|
|
|
.import 'qrc:/ui/scripts/Utils/utils.js' as Utils
|
|
|
|
// =============================================================================
|
|
|
|
function cleanLogs () {
|
|
window.attachVirtualWindow(Utils.buildDialogUri('ConfirmDialog'), {
|
|
descriptionText: qsTr('cleanLogsDescription'),
|
|
}, function (status) {
|
|
if (status) {
|
|
Linphone.CoreManager.cleanLogs()
|
|
}
|
|
})
|
|
}
|
|
|
|
function handleLogsUploaded (url) {
|
|
if (url.length && Utils.startsWith(url, 'http')) {
|
|
sendLogsBlock.stop('')
|
|
Qt.openUrlExternally(
|
|
'mailto:' + encodeURIComponent(Linphone.SettingsModel.logsEmail) +
|
|
'?subject=' + encodeURIComponent('Desktop Linphone Log') +
|
|
'&body=' + encodeURIComponent(url)
|
|
)
|
|
} else {
|
|
sendLogsBlock.stop(qsTr('logsUploadFailed'))
|
|
}
|
|
}
|