2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick . Controls 2.13
import QtQuick . Layouts 1.13
2020-11-03 21:04:57 +00:00
import QtGraphicalEffects 1.13
2021-09-28 15:04:06 +00:00
import utils 1.0
2021-10-27 21:27:49 +00:00
import shared 1.0
import shared . panels 1.0
import shared . popups 1.0
import shared . status 1.0
2020-05-27 21:28:25 +00:00
2021-12-30 12:39:47 +00:00
import "../stores"
2021-10-06 09:16:39 +00:00
import "../controls"
import "../popups"
import "../panels"
2022-05-07 11:45:15 +00:00
SettingsContentBase {
2021-10-06 09:16:39 +00:00
id: root
2021-12-09 13:28:02 +00:00
2021-12-30 12:39:47 +00:00
property AdvancedStore advancedStore
2021-12-14 18:47:32 +00:00
2021-08-06 12:25:51 +00:00
Item {
id: advancedContainer
2022-05-07 11:45:15 +00:00
width: root . contentWidth
2021-08-06 12:25:51 +00:00
height: generalColumn . height
2021-01-05 16:36:42 +00:00
2021-08-06 12:25:51 +00:00
Column {
id: generalColumn
anchors.top: parent . top
anchors.left: parent . left
2022-05-07 11:45:15 +00:00
width: root . contentWidth
2021-01-14 14:12:37 +00:00
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Network"
text: qsTrId ( "network" )
2022-02-08 09:34:45 +00:00
visible: ! localAccountSensitiveSettings . isMultiNetworkEnabled
2021-12-14 18:47:32 +00:00
currentValue: root . advancedStore . currentNetworkName
2021-08-06 12:25:51 +00:00
onClicked: networksModal . open ( )
}
2021-01-05 16:36:42 +00:00
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Fleet"
text: qsTrId ( "fleet" )
2021-12-14 18:47:32 +00:00
currentValue: root . advancedStore . fleet
2021-08-06 12:25:51 +00:00
onClicked: fleetModal . open ( )
2021-02-22 22:10:47 +00:00
}
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Minimize on close"
text: qsTrId ( "minimize-on-close" )
isSwitch: true
2021-10-20 09:50:50 +00:00
switchChecked: ! localAccountSensitiveSettings . quitOnClose
2021-08-06 12:25:51 +00:00
onClicked: function ( checked ) {
2021-10-20 09:50:50 +00:00
localAccountSensitiveSettings . quitOnClose = ! checked
2021-08-06 12:25:51 +00:00
}
}
2021-01-19 20:51:16 +00:00
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-09-14 16:17:35 +00:00
StyledText {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-09-14 16:17:35 +00:00
//% "Application Logs"
text: qsTr ( "Application Logs" )
font.pixelSize: 15
font.underline: mouseArea . containsMouse
color: Style . current . blue
topPadding: 23
MouseArea {
id: mouseArea
anchors.fill: parent
cursorShape: Qt . PointingHandCursor
hoverEnabled: true
onClicked: {
2021-12-14 18:47:32 +00:00
Qt . openUrlExternally ( root . advancedStore . logDir ( ) )
2021-09-14 16:17:35 +00:00
}
}
}
2021-08-06 12:25:51 +00:00
Item {
id: spacer1
height: Style . current . bigPadding
width: parent . width
}
2020-08-18 19:10:30 +00:00
2021-08-06 12:25:51 +00:00
Separator {
2022-05-07 11:45:15 +00:00
width: parent . width
2021-08-06 12:25:51 +00:00
}
2020-06-26 14:08:08 +00:00
2021-08-06 12:25:51 +00:00
StatusSectionHeadline {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-08-06 12:25:51 +00:00
//% "Experimental features"
text: qsTrId ( "experimental-features" )
topPadding: Style . current . bigPadding
bottomPadding: Style . current . padding
2020-09-22 15:12:48 +00:00
}
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Wallet"
text: qsTrId ( "wallet" )
isSwitch: true
2021-10-20 09:50:50 +00:00
switchChecked: localAccountSensitiveSettings . isWalletEnabled
2021-08-06 12:25:51 +00:00
onClicked: {
2021-10-20 09:50:50 +00:00
if ( ! localAccountSensitiveSettings . isWalletEnabled ) {
2021-12-24 08:24:26 +00:00
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . wallet
2021-08-06 12:25:51 +00:00
confirmationPopup . open ( )
} else {
2021-12-24 08:24:26 +00:00
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . wallet )
2021-08-13 20:04:04 +00:00
}
}
}
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Dapp Browser"
text: qsTrId ( "dapp-browser" )
isSwitch: true
2021-10-20 09:50:50 +00:00
switchChecked: localAccountSensitiveSettings . isBrowserEnabled
2021-08-06 12:25:51 +00:00
onClicked: {
2021-10-20 09:50:50 +00:00
if ( ! localAccountSensitiveSettings . isBrowserEnabled ) {
2021-12-24 08:24:26 +00:00
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . browser
2021-08-06 12:25:51 +00:00
confirmationPopup . open ( )
} else {
2021-12-24 08:24:26 +00:00
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . browser )
2021-08-06 12:25:51 +00:00
}
2021-04-23 10:22:07 +00:00
}
2021-01-14 14:12:37 +00:00
}
2020-11-23 19:14:48 +00:00
2022-04-08 10:41:35 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-05-26 07:15:11 +00:00
text: qsTr ( "Community History Archive Protocol" )
2022-04-08 10:41:35 +00:00
isSwitch: true
switchChecked: root . advancedStore . isCommunityHistoryArchiveSupportEnabled
onClicked: {
if ( ! root . advancedStore . isCommunityHistoryArchiveSupportEnabled ) {
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . communityHistoryArchiveSupport
confirmationPopup . open ( )
} else {
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . communityHistoryArchiveSupport )
}
}
}
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-08-06 12:25:51 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-08-06 12:25:51 +00:00
//% "Node Management"
text: qsTrId ( "node-management" )
isSwitch: true
2021-10-20 09:50:50 +00:00
switchChecked: localAccountSensitiveSettings . nodeManagementEnabled
2021-08-06 12:25:51 +00:00
onClicked: {
2021-10-20 09:50:50 +00:00
if ( ! localAccountSensitiveSettings . nodeManagementEnabled ) {
2021-12-24 08:24:26 +00:00
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . nodeManagement
2021-08-06 12:25:51 +00:00
confirmationPopup . open ( )
} else {
2021-12-24 08:24:26 +00:00
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . nodeManagement )
2021-08-06 12:25:51 +00:00
}
}
2021-06-30 18:46:26 +00:00
}
2022-02-08 09:34:45 +00:00
// TODO: replace with StatusQ component
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-08 09:34:45 +00:00
text: qsTr ( "Multi network" )
isSwitch: true
switchChecked: localAccountSensitiveSettings . isMultiNetworkEnabled
onClicked: {
if ( localAccountSensitiveSettings . isMultiNetworkEnabled ) {
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . multiNetwork )
} else {
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . multiNetwork
confirmationPopup . open ( )
}
}
2021-09-22 08:51:04 +00:00
}
2021-10-06 09:16:39 +00:00
// TODO: replace with StatusQ component
2021-09-22 08:51:04 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-09-22 08:51:04 +00:00
//% "Keycard"
text: qsTr ( "Keycard" )
isSwitch: true
2021-11-02 08:26:48 +00:00
switchChecked: localAccountSettings . isKeycardEnabled
2021-09-22 08:51:04 +00:00
onClicked: {
2021-12-24 08:24:26 +00:00
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . keycard )
2021-09-22 08:51:04 +00:00
}
2021-07-23 15:08:52 +00:00
}
2022-05-23 13:11:30 +00:00
// TODO: replace with StatusQ component
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Communities Portal" )
isSwitch: true
switchChecked: localAccountSensitiveSettings . isCommunitiesPortalEnabled
onClicked: {
if ( localAccountSensitiveSettings . isCommunitiesPortalEnabled ) {
root . advancedStore . toggleExperimentalFeature ( root . advancedStore . experimentalFeatures . communitiesPortal )
} else {
confirmationPopup . experimentalFeature = root . advancedStore . experimentalFeatures . communitiesPortal
confirmationPopup . open ( )
}
}
}
2021-08-06 12:25:51 +00:00
StatusSectionHeadline {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-12-14 18:47:32 +00:00
visible: ! root . advancedStore . isWakuV2
2021-08-06 12:25:51 +00:00
//% "Bloom filter level"
text: qsTrId ( "bloom-filter-level" )
topPadding: Style . current . bigPadding
bottomPadding: Style . current . padding
}
2021-07-21 13:11:27 +00:00
2021-08-06 12:25:51 +00:00
Row {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-12-14 18:47:32 +00:00
visible: ! root . advancedStore . isWakuV2
2021-08-06 12:25:51 +00:00
spacing: 11
2021-07-12 12:10:12 +00:00
2021-08-06 12:25:51 +00:00
Component {
id: bloomConfirmationDialogComponent
ConfirmationDialog {
property string mode: "normal"
2021-07-12 12:10:12 +00:00
2021-08-06 12:25:51 +00:00
id: confirmDialog
//% "Warning!"
2021-09-09 09:10:29 +00:00
header.title: qsTrId ( "close-app-title" )
2021-08-06 12:25:51 +00:00
//% "The account will be logged out. When you login again, the selected mode will be enabled"
confirmationText: qsTrId ( "the-account-will-be-logged-out--when-you-login-again--the-selected-mode-will-be-enabled" )
onConfirmButtonClicked: {
2021-12-14 18:47:32 +00:00
root . advancedStore . setBloomLevel ( mode )
2021-08-06 12:25:51 +00:00
}
onClosed: {
2021-12-14 18:47:32 +00:00
switch ( root . advancedStore . bloomLevel ) {
case "light" : btnBloomLight . click ( ) ; break ;
case "normal" : btnBloomNormal . click ( ) ; break ;
case "full" : btnBloomFull . click ( ) ; break ;
}
2021-08-06 12:25:51 +00:00
destroy ( )
2021-07-21 13:11:27 +00:00
}
2021-07-12 12:10:12 +00:00
}
}
2021-07-21 13:11:27 +00:00
2021-08-06 12:25:51 +00:00
ButtonGroup {
id: bloomGroup
}
2021-07-21 13:11:27 +00:00
2021-08-06 12:25:51 +00:00
BloomSelectorButton {
id: btnBloomLight
buttonGroup: bloomGroup
2021-12-14 18:47:32 +00:00
checkedByDefault: root . advancedStore . bloomLevel == "light"
2021-08-06 12:25:51 +00:00
//% "Light Node"
btnText: qsTrId ( "light-node" )
onToggled: {
2021-12-14 18:47:32 +00:00
if ( root . advancedStore . bloomLevel != "light" ) {
2021-12-07 20:33:12 +00:00
Global . openPopup ( bloomConfirmationDialogComponent , { mode: "light" } )
2021-08-06 12:25:51 +00:00
} else {
btnBloomLight . click ( )
}
2021-07-21 13:11:27 +00:00
}
}
2021-08-06 12:25:51 +00:00
BloomSelectorButton {
id: btnBloomNormal
buttonGroup: bloomGroup
2021-12-14 18:47:32 +00:00
checkedByDefault: root . advancedStore . bloomLevel == "normal"
2021-08-06 12:25:51 +00:00
//% "Normal"
btnText: qsTrId ( "normal" )
onToggled: {
2021-12-14 18:47:32 +00:00
if ( root . advancedStore . bloomLevel != "normal" ) {
2021-12-07 20:33:12 +00:00
Global . openPopup ( bloomConfirmationDialogComponent , { mode: "normal" } )
2021-08-06 12:25:51 +00:00
} else {
btnBloomNormal . click ( )
}
2021-07-21 13:11:27 +00:00
}
}
2021-08-06 12:25:51 +00:00
BloomSelectorButton {
id: btnBloomFull
buttonGroup: bloomGroup
2021-12-14 18:47:32 +00:00
checkedByDefault: root . advancedStore . bloomLevel == "full"
2021-08-06 12:25:51 +00:00
//% "Full Node"
btnText: qsTrId ( "full-node" )
onToggled: {
2021-12-14 18:47:32 +00:00
if ( root . advancedStore . bloomLevel != "full" ) {
2021-12-07 20:33:12 +00:00
Global . openPopup ( bloomConfirmationDialogComponent , { mode: "full" } )
2021-08-06 12:25:51 +00:00
} else {
btnBloomFull . click ( )
}
2021-07-21 13:11:27 +00:00
}
}
2021-08-09 15:23:44 +00:00
}
2021-09-06 22:31:10 +00:00
StatusSectionHeadline {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-12-14 18:47:32 +00:00
visible: root . advancedStore . isWakuV2
2021-09-06 22:31:10 +00:00
text: qsTr ( "WakuV2 mode" )
topPadding: Style . current . bigPadding
bottomPadding: Style . current . padding
}
Row {
2022-05-07 11:45:15 +00:00
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2021-09-06 22:31:10 +00:00
spacing: 11
2021-12-14 18:47:32 +00:00
visible: root . advancedStore . isWakuV2
2021-09-06 22:31:10 +00:00
Component {
id: wakuV2ModeConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
//% "The account will be logged out. When you login again, the selected mode will be enabled"
confirmationText: qsTrId ( "the-account-will-be-logged-out--when-you-login-again--the-selected-mode-will-be-enabled" )
onConfirmButtonClicked: {
2021-12-14 18:47:32 +00:00
root . advancedStore . setWakuV2LightClientEnabled ( mode )
2021-09-06 22:31:10 +00:00
}
onClosed: {
2021-12-14 18:47:32 +00:00
if ( root . advancedStore . wakuV2LightClientEnabled ) {
2021-09-06 22:31:10 +00:00
btnWakuV2Light . click ( )
} else {
btnWakuV2Full . click ( ) ;
}
destroy ( )
}
}
}
ButtonGroup {
id: wakuV2Group
}
BloomSelectorButton {
id: btnWakuV2Light
buttonGroup: wakuV2Group
2021-12-14 18:47:32 +00:00
checkedByDefault: root . advancedStore . wakuV2LightClientEnabled
2021-09-06 22:31:10 +00:00
//% "Light Node"
btnText: qsTrId ( "light-node" )
onToggled: {
2021-12-14 18:47:32 +00:00
if ( ! root . advancedStore . wakuV2LightClientEnabled ) {
2021-12-07 20:33:12 +00:00
Global . openPopup ( wakuV2ModeConfirmationDialogComponent , { mode: true } )
2021-09-06 22:31:10 +00:00
} else {
btnWakuV2Light . click ( )
}
}
}
BloomSelectorButton {
id: btnWakuV2Full
buttonGroup: wakuV2Group
2021-12-14 18:47:32 +00:00
checkedByDefault: ! root . advancedStore . wakuV2LightClientEnabled
2021-09-06 22:31:10 +00:00
//% "Full Node"
btnText: qsTrId ( "full-node" )
onToggled: {
2021-12-14 18:47:32 +00:00
if ( root . advancedStore . wakuV2LightClientEnabled ) {
2021-12-07 20:33:12 +00:00
Global . openPopup ( wakuV2ModeConfirmationDialogComponent , { mode: false } )
2021-09-06 22:31:10 +00:00
} else {
btnWakuV2Full . click ( )
}
}
}
}
2022-05-07 11:45:15 +00:00
StatusSectionHeadline {
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
2022-02-02 22:06:23 +00:00
text: qsTr ( "Developer features" )
topPadding: Style . current . bigPadding
bottomPadding: Style . current . padding
}
Separator {
2022-05-07 11:45:15 +00:00
width: parent . width
2022-02-02 22:06:23 +00:00
}
2021-08-09 15:23:44 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-02 22:06:23 +00:00
text: qsTr ( "Full developer mode" )
isEnabled: {
return ! localAccountSensitiveSettings . downloadChannelMessagesEnabled ||
! root . advancedStore . isTelemetryEnabled ||
! root . advancedStore . isDebugEnabled ||
! root . advancedStore . isAutoMessageEnabled
}
2021-08-09 15:23:44 +00:00
onClicked: {
2022-02-02 22:06:23 +00:00
Global . openPopup ( enableDeveloperFeaturesConfirmationDialogComponent )
2021-08-09 15:23:44 +00:00
}
}
2021-11-04 14:41:25 +00:00
2022-02-02 22:06:23 +00:00
Separator {
2022-05-07 11:45:15 +00:00
width: parent . width
2022-02-02 22:06:23 +00:00
}
2021-11-04 14:41:25 +00:00
// TODO: replace with StatusQ component
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-02 22:06:23 +00:00
text: qsTr ( "Download messages" )
2021-11-04 14:41:25 +00:00
isSwitch: true
2022-02-02 22:06:23 +00:00
switchChecked: localAccountSensitiveSettings . downloadChannelMessagesEnabled
2021-11-04 14:41:25 +00:00
onClicked: {
2022-02-02 22:06:23 +00:00
localAccountSensitiveSettings . downloadChannelMessagesEnabled = ! localAccountSensitiveSettings . downloadChannelMessagesEnabled
2021-11-04 14:41:25 +00:00
}
}
2021-11-11 16:22:03 +00:00
2021-11-24 14:20:05 +00:00
// TODO: replace with StatusQ component
2021-11-11 16:22:03 +00:00
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-02 22:06:23 +00:00
text: qsTr ( "Telemetry" )
2021-11-11 16:22:03 +00:00
isSwitch: true
2021-12-14 18:47:32 +00:00
switchChecked: root . advancedStore . isTelemetryEnabled
2021-11-11 16:22:03 +00:00
onClicked: {
2022-02-02 22:06:23 +00:00
Global . openPopup ( enableTelemetryConfirmationDialogComponent )
2021-11-11 16:22:03 +00:00
}
}
2021-11-24 14:20:05 +00:00
// TODO: replace with StatusQ component
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2021-12-07 20:33:12 +00:00
text: qsTr ( "Debug" )
2021-11-24 14:20:05 +00:00
isSwitch: true
2021-12-14 18:47:32 +00:00
switchChecked: root . advancedStore . isDebugEnabled
2021-11-24 14:20:05 +00:00
onClicked: {
2021-12-07 20:33:12 +00:00
Global . openPopup ( enableDebugComponent )
2021-12-07 09:31:21 +00:00
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-02 22:06:23 +00:00
text: qsTr ( "Auto message" )
2021-12-07 09:31:21 +00:00
isSwitch: true
2021-12-14 18:47:32 +00:00
switchChecked: root . advancedStore . isAutoMessageEnabled
2021-12-07 09:31:21 +00:00
onClicked: {
2022-02-02 22:06:23 +00:00
Global . openPopup ( enableAutoMessageConfirmationDialogComponent )
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
2022-05-07 11:45:15 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
2022-02-02 22:06:23 +00:00
text: qsTr ( "Stickers/ENS on ropsten" )
2022-05-19 08:53:57 +00:00
visible: ! localAccountSensitiveSettings . isMultiNetworkEnabled && root . advancedStore . currentNetworkId === Constants . networkRopsten
2022-02-02 22:06:23 +00:00
isSwitch: true
switchChecked: localAccountSensitiveSettings . stickersEnsRopsten
onClicked: {
localAccountSensitiveSettings . stickersEnsRopsten = ! localAccountSensitiveSettings . stickersEnsRopsten
2021-11-24 14:20:05 +00:00
}
}
2021-08-06 12:25:51 +00:00
}
2020-11-03 21:04:57 +00:00
2021-08-06 12:25:51 +00:00
NetworksModal {
id: networksModal
2021-12-14 18:47:32 +00:00
advancedStore: root . advancedStore
2021-08-06 12:25:51 +00:00
}
2020-08-25 09:00:03 +00:00
2021-08-06 12:25:51 +00:00
FleetsModal {
id: fleetModal
2021-12-14 18:47:32 +00:00
advancedStore: root . advancedStore
2021-04-23 10:22:07 +00:00
}
2020-08-27 17:28:31 +00:00
2022-02-02 22:06:23 +00:00
Component {
id: enableDeveloperFeaturesConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
showCancelButton: true
confirmationText: qsTr ( "Are you sure you want to enable all the develoer features? The app will be restarted." )
onConfirmButtonClicked: {
localAccountSensitiveSettings . downloadChannelMessagesEnabled = true
Qt . callLater ( root . advancedStore . enableDeveloperFeatures )
close ( )
}
onCancelButtonClicked: {
close ( )
}
}
}
2021-11-04 14:41:25 +00:00
Component {
id: enableTelemetryConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
showCancelButton: true
confirmationText: qsTr ( "Are you sure you want to enable telemetry? This will reduce your privacy level while using Status. You need to restart the app for this change to take effect." )
onConfirmButtonClicked: {
2021-12-14 18:47:32 +00:00
root . advancedStore . toggleTelemetry ( )
2021-11-04 14:41:25 +00:00
close ( )
2021-11-24 14:20:05 +00:00
}
onCancelButtonClicked: {
close ( )
}
}
}
Component {
id: enableAutoMessageConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
showCancelButton: true
confirmationText: qsTr ( "Are you sure you want to enable auto message? You need to restart the app for this change to take effect." )
onConfirmButtonClicked: {
2021-12-14 18:47:32 +00:00
root . advancedStore . toggleAutoMessage ( )
2021-11-24 14:20:05 +00:00
close ( )
2021-11-04 14:41:25 +00:00
}
onCancelButtonClicked: {
close ( )
}
}
}
2021-11-11 16:22:03 +00:00
Component {
id: enableDebugComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
showCancelButton: true
2022-02-02 22:06:23 +00:00
confirmationText: qsTr ( "Are you sure you want to %1 debug mode? You need to restart the app for this change to take effect." ) . arg ( root . advancedStore . isDebugEnabled ?
2022-02-09 09:43:23 +00:00
qsTr ( "disable" ) :
2021-11-11 16:22:03 +00:00
qsTr ( "enable" ) )
onConfirmButtonClicked: {
2021-12-14 18:47:32 +00:00
root . advancedStore . toggleDebug ( )
2021-11-11 16:22:03 +00:00
close ( )
}
onCancelButtonClicked: {
close ( )
}
}
}
2021-08-06 12:25:51 +00:00
ConfirmationDialog {
id: confirmationPopup
2021-12-24 08:24:26 +00:00
property string experimentalFeature: ""
2021-08-06 12:25:51 +00:00
showCancelButton: true
//% "This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk."
2021-12-24 08:24:26 +00:00
confirmationText: qsTrId ( "this-feature-is-experimental-and-is-meant-for-testing-purposes-by-core-contributors-and-the-community--it-s-not-meant-for-real-use-and-makes-no-claims-of-security-or-integrity-of-funds-or-data--use-at-your-own-risk-" )
2021-08-06 12:25:51 +00:00
//% "I understand"
confirmButtonLabel: qsTrId ( "i-understand" )
onConfirmButtonClicked: {
2021-12-24 08:24:26 +00:00
root . advancedStore . toggleExperimentalFeature ( experimentalFeature )
experimentalFeature = ""
2021-08-06 12:25:51 +00:00
close ( )
}
onCancelButtonClicked: {
close ( )
}
2021-04-23 10:22:07 +00:00
}
}
2020-06-18 12:03:11 +00:00
}