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-08-20 15:51:18 +00:00
signal setMetricsEnabledRequested ( bool enabled )
2024-07-19 12:15:50 +00:00
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-20 15:51:18 +00:00
textFormat: Text . RichText
text: qsTr ( "Usage data will be shared from all profiles added to device. %1 %2" )
. arg ( root . placement !== Constants . metricsEnablePlacement . privacyAndSecurity ? qsTr ( "Sharing usage data can be turned off anytime in Settings / Privacy and Security." ) : "" )
. arg ( root . placement === Constants . metricsEnablePlacement . privacyAndSecurity ? qsTr ( "For more details refer to our %1." ) . arg ( Utils . getStyledLink ( "Privacy Policy" , "#" , hoveredLink ) ) : "" )
onLinkActivated: {
root . close ( )
Global . privacyPolicyRequested ( )
}
HoverHandler {
cursorShape: ! ! parent . hoveredLink ? Qt.PointingHandCursor : undefined
}
2024-07-15 13:34:40 +00:00
}
}
}
rightButtons: [
2024-08-20 15:51:18 +00:00
StatusFlatButton {
text: qsTr ( "Do not share" )
2024-07-15 13:34:40 +00:00
onClicked: {
2024-08-20 15:51:18 +00:00
root . setMetricsEnabledRequested ( false )
2024-07-19 12:15:50 +00:00
close ( )
2024-07-15 13:34:40 +00:00
}
2024-08-20 15:51:18 +00:00
objectName: "notShareMetricsButton"
normalColor: "transparent"
} ,
2024-07-15 13:34:40 +00:00
StatusButton {
2024-08-20 15:51:18 +00:00
text: qsTr ( "Share usage data" )
2024-07-15 13:34:40 +00:00
onClicked: {
2024-08-20 15:51:18 +00:00
root . setMetricsEnabledRequested ( true )
2024-07-19 12:15:50 +00:00
close ( )
2024-07-15 13:34:40 +00:00
}
2024-08-20 15:51:18 +00:00
objectName: "shareMetricsButton"
2024-07-15 13:34:40 +00:00
}
]
}