2024-07-15 13:34:40 +00:00
import QtQuick 2.15
import QtQuick . Controls 2.15
import QtQuick . Layouts 1.15
import StatusQ . Core 0.1
import StatusQ . Controls 0.1
import StatusQ . Popups 0.1
import StatusQ . Popups . Dialog 0.1
import StatusQ . Components 0.1
import StatusQ . Core . Theme 0.1
import utils 1.0
StatusModal {
id: root
2024-08-08 20:53:49 +00:00
property string placement: Constants . metricsEnablePlacement . unknown
2024-07-15 13:34:40 +00:00
2024-07-19 12:15:50 +00:00
signal toggleMetrics ( bool enabled )
2024-07-15 13:34:40 +00:00
width: 640
title: qsTr ( "Help us improve Status" )
hasCloseButton: true
verticalPadding: 20
closePolicy: Popup . CloseOnEscape
component Paragraph: StatusBaseText {
lineHeightMode: Text . FixedHeight
lineHeight: 22
visible: true
wrapMode: Text . Wrap
}
component AgreementSection: ColumnLayout {
property alias title: titleItem . text
property alias body: bodyItem . text
spacing: 8
Paragraph {
id: titleItem
Layout.fillWidth: true
Layout.fillHeight: true
font.weight: Font . Bold
}
Paragraph {
id: bodyItem
Layout.fillWidth: true
Layout.fillHeight: true
}
}
StatusScrollView {
id: scrollView
anchors.fill: parent
contentWidth: availableWidth
ColumnLayout {
id: layout
width: scrollView . availableWidth
spacing: 20
Paragraph {
Layout.fillWidth: true
Layout.fillHeight: true
text: qsTr ( "Collecting usage data helps us improve Status." )
}
AgreementSection {
title: qsTr ( "What we will receive:" )
body: qsTr ( " • IP address
• Universally Unique Identifiers of device
• Logs of actions within the app , including button presses and screen visits " )
}
AgreementSection {
title: qsTr ( "What we won’ t receive:" )
body: qsTr ( " • Your profile information
• Your addresses
• Information you input and send " )
}
Paragraph {
Layout.fillWidth: true
Layout.fillHeight: true
2024-08-08 20:53:49 +00:00
text: qsTr ( "Usage data will be shared from all profiles added to device. %1" ) . arg ( root . placement !== Constants . metricsEnablePlacement . privacyAndSecurity ? "Sharing usage data can be turned off anytime in Settings / Privacy and Security." : "" )
2024-07-15 13:34:40 +00:00
}
}
}
rightButtons: [
StatusButton {
text: qsTr ( "Share usage data" )
onClicked: {
2024-07-19 12:15:50 +00:00
root . toggleMetrics ( true )
close ( )
2024-07-15 13:34:40 +00:00
}
objectName: "shareMetricsButton"
}
]
leftButtons: [
StatusButton {
text: qsTr ( "Not now" )
onClicked: {
2024-07-19 12:15:50 +00:00
root . toggleMetrics ( false )
close ( )
2024-07-15 13:34:40 +00:00
}
objectName: "notShareMetricsButton"
normalColor: "transparent"
}
]
}