2024-07-15 13:34:40 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
SettingsContentBase {
|
|
|
|
id: root
|
|
|
|
|
2024-07-19 12:15:50 +00:00
|
|
|
required property bool isCentralizedMetricsEnabled
|
2024-07-15 13:34:40 +00:00
|
|
|
|
2024-07-19 12:15:50 +00:00
|
|
|
function refreshSwitch() {
|
|
|
|
enableMetricsSwitch.checked = Qt.binding(function() { return root.isCentralizedMetricsEnabled })
|
2024-07-15 13:34:40 +00:00
|
|
|
}
|
|
|
|
|
2024-08-20 15:51:18 +00:00
|
|
|
titleRowComponentLoader.sourceComponent: StatusButton {
|
|
|
|
text: qsTr("Privacy policy")
|
|
|
|
onClicked: Global.privacyPolicyRequested()
|
|
|
|
}
|
|
|
|
|
2024-07-15 13:34:40 +00:00
|
|
|
ColumnLayout {
|
|
|
|
StatusListItem {
|
|
|
|
Layout.preferredWidth: root.contentWidth
|
|
|
|
title: qsTr("Share usage data with Status")
|
2024-07-19 12:15:50 +00:00
|
|
|
subTitle: qsTr("From all profiles on device")
|
2024-07-15 13:34:40 +00:00
|
|
|
components: [
|
|
|
|
StatusSwitch {
|
|
|
|
id: enableMetricsSwitch
|
2024-07-19 12:15:50 +00:00
|
|
|
checked: root.isCentralizedMetricsEnabled
|
2024-08-20 15:51:18 +00:00
|
|
|
onToggled: {
|
|
|
|
Global.openMetricsEnablePopupRequested(Constants.metricsEnablePlacement.privacyAndSecurity, null)
|
|
|
|
refreshSwitch()
|
2024-07-15 13:34:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
onClicked: {
|
2024-08-20 15:51:18 +00:00
|
|
|
Global.openMetricsEnablePopupRequested(Constants.metricsEnablePlacement.privacyAndSecurity, null)
|
|
|
|
refreshSwitch()
|
2024-07-15 13:34:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|