2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick . Controls 2.13
2022-11-21 12:51:39 +00:00
import QtQml . Models 2.14
2020-06-17 19:18:31 +00:00
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
2023-04-07 15:06:41 +00:00
import shared . controls 1.0
2020-05-27 21:28:25 +00:00
2022-08-18 14:25:06 +00:00
import StatusQ . Core 0.1
2023-05-08 20:00:32 +00:00
import StatusQ . Popups 0.1
2022-11-21 12:51:39 +00:00
import StatusQ . Popups . Dialog 0.1
2023-04-26 15:46:04 +00:00
import StatusQ . Components 0.1
import StatusQ . Core . Theme 0.1
2022-11-21 12:51:39 +00:00
import StatusQ . Controls 0.1
2023-05-08 20:00:32 +00:00
import StatusQ . Controls . Validators 0.1
2022-08-18 14:25:06 +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"
2024-04-10 20:56:10 +00:00
/////////////////////////////////////////////////////
// WalletConnect POC - to remove
import AppLayouts . Wallet . views . pocwalletconnect 1.0
/////////////////////////////////////////////////////
2023-10-27 16:18:24 +00:00
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
2023-04-26 15:46:04 +00:00
property MessagingStore messagingStore
2021-12-30 12:39:47 +00:00
property AdvancedStore advancedStore
2024-02-07 13:47:28 +00:00
property WalletStore walletStore
2021-12-14 18:47:32 +00:00
2024-03-06 09:14:48 +00:00
property bool isFleetSelectionEnabled
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
2023-06-15 18:34:25 +00:00
QtObject {
id: d
readonly property string experimentalFeatureMessage: qsTr ( "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
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
2022-04-04 11:26:30 +00:00
text: qsTr ( "Fleet" )
2021-12-14 18:47:32 +00:00
currentValue: root . advancedStore . fleet
2021-08-06 12:25:51 +00:00
onClicked: fleetModal . open ( )
2024-03-06 09:14:48 +00:00
visible: root . isFleetSelectionEnabled
2021-02-22 22:10:47 +00:00
}
2023-04-07 15:06:41 +00:00
StatusSettingsLineButton {
id: labelScrolling
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Chat scrolling" )
currentValue: root . advancedStore . isCustomScrollingEnabled ? qsTr ( "Custom" ) : qsTr ( "System" )
onClicked: scrollingModal . open ( )
}
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
2022-04-04 11:26:30 +00:00
text: qsTr ( "Minimize on close" )
2021-08-06 12:25:51 +00:00
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
2024-02-20 19:07:22 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Mainnet data verified by Nimbus" )
isSwitch: true
switchChecked: root . advancedStore . isNimbusProxyEnabled
onClicked: {
Global . openPopup ( enableNimbusProxyComponent )
}
}
2022-08-18 14:25:06 +00:00
StatusBaseText {
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
text: qsTr ( "Application Logs" )
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
2022-04-04 11:26:30 +00:00
text: qsTr ( "Experimental features" )
2021-08-06 12:25:51 +00:00
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
2022-04-04 11:26:30 +00:00
text: qsTr ( "Dapp Browser" )
2021-08-06 12:25:51 +00:00
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
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
2022-04-04 11:26:30 +00:00
text: qsTr ( "Node Management" )
2021-08-06 12:25:51 +00:00
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
}
2024-04-10 20:56:10 +00:00
/////////////////////////////////////////////////////
// WalletConnect POC - to remove
2024-04-29 18:35:44 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
2024-05-03 07:54:33 +00:00
objectName: "enableCreateCommunityButton"
2024-04-29 18:35:44 +00:00
text: qsTr ( "Enable Community Creation" )
isSwitch: true
switchChecked: root . advancedStore . createCommunityEnabled
onClicked: {
root . advancedStore . toggleCreateCommunityEnabled ( )
}
}
2023-10-27 16:18:24 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
2024-04-10 20:56:10 +00:00
text: qsTr ( "POC Wallet Connect" )
2023-10-27 16:18:24 +00:00
visible: root . advancedStore . isDebugEnabled
onClicked: {
2023-11-15 21:26:12 +00:00
Global . popupWalletConnect ( )
2023-10-27 16:18:24 +00:00
}
}
2024-04-10 20:56:10 +00:00
/////////////////////////////////////////////////////
2023-10-27 16:18:24 +00:00
2024-04-29 20:37:22 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Archive Protocol Enabled" )
isSwitch: true
switchChecked: root . advancedStore . archiveProtocolEnabled
onClicked: {
root . advancedStore . toggleArchiveProtocolEnabled ( )
}
}
2023-04-26 15:46:04 +00:00
Separator {
width: parent . width
}
StatusSectionHeadline {
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
text: qsTr ( "WakuV2 options" )
topPadding: Style . current . bigPadding
bottomPadding: Style . current . padding
}
2023-09-25 16:18:22 +00:00
// TODO: replace with StatusQ component
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Enable creation of sharded communities" )
isSwitch: true
switchChecked: root . advancedStore . isWakuV2ShardedCommunitiesEnabled
onClicked: root . advancedStore . toggleWakuV2ShardedCommunities ( )
}
2023-04-26 15:46:04 +00:00
StatusListItem {
anchors.left: parent . left
anchors.right: parent . right
title: qsTr ( "Waku Nodes" )
components: [
StatusIcon {
icon: "next"
color: Theme . palette . baseColor1
}
]
onClicked: Global . openPopup ( wakuNodesModalComponent )
}
2021-09-06 22:31:10 +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-09-06 22:31:10 +00:00
spacing: 11
2023-06-15 18:34:25 +00:00
2021-09-06 22:31:10 +00:00
Component {
id: wakuV2ModeConfirmationDialogComponent
2023-06-15 18:34:25 +00:00
ConfirmationDialog {
2021-09-06 22:31:10 +00:00
id: confirmDialog
2023-06-15 18:34:25 +00:00
property bool lightMode: false
confirmationText: ( ! lightMode ? "" : ( d . experimentalFeatureMessage + "\n\n" ) )
+ qsTr ( "The account will be logged out. When you login again, the selected mode will be enabled" )
confirmButtonLabel: lightMode ? qsTr ( "I understand" ) : qsTr ( "Confirm" )
showCancelButton: lightMode
2021-09-06 22:31:10 +00:00
onConfirmButtonClicked: {
2023-06-15 18:34:25 +00:00
root . advancedStore . setWakuV2LightClientEnabled ( lightMode )
}
onCancelButtonClicked: {
close ( )
2021-09-06 22:31:10 +00:00
}
onClosed: {
2023-06-15 18:34:25 +00:00
if ( root . advancedStore . wakuV2LightClientEnabled ) {
btnWakuV2Light . toggle ( )
2021-09-06 22:31:10 +00:00
} else {
2023-06-15 18:34:25 +00:00
btnWakuV2Full . toggle ( )
2021-09-06 22:31:10 +00:00
}
destroy ( )
}
}
}
ButtonGroup {
id: wakuV2Group
}
BloomSelectorButton {
id: btnWakuV2Light
2024-07-02 07:24:03 +00:00
objectName: "lightWakuModeButton"
2021-09-06 22:31:10 +00:00
buttonGroup: wakuV2Group
2021-12-14 18:47:32 +00:00
checkedByDefault: root . advancedStore . wakuV2LightClientEnabled
2023-06-15 18:34:25 +00:00
btnText: qsTr ( "Light mode" )
2021-09-06 22:31:10 +00:00
onToggled: {
2023-06-15 18:34:25 +00:00
Global . openPopup ( wakuV2ModeConfirmationDialogComponent , { lightMode: true } )
2021-09-06 22:31:10 +00:00
}
}
BloomSelectorButton {
id: btnWakuV2Full
2024-07-02 07:24:03 +00:00
objectName: "relayWakuModeButton"
2021-09-06 22:31:10 +00:00
buttonGroup: wakuV2Group
2021-12-14 18:47:32 +00:00
checkedByDefault: ! root . advancedStore . wakuV2LightClientEnabled
2023-06-15 18:34:25 +00:00
btnText: qsTr ( "Relay mode" )
2021-09-06 22:31:10 +00:00
onToggled: {
2023-06-15 18:34:25 +00:00
Global . openPopup ( wakuV2ModeConfirmationDialogComponent , { lightMode: false } )
2021-09-06 22:31:10 +00:00
}
}
}
2023-10-18 09:03:32 +00:00
// SYNC WAKU SECTION
StatusListItem {
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
title: qsTr ( "History nodes" )
2024-06-04 12:55:08 +00:00
label: root . messagingStore . activeMailserverId || "---"
2023-10-18 09:03:32 +00:00
components: [
StatusIcon {
icon: "next"
color: Theme . palette . baseColor1
}
]
onClicked: Global . openPopup ( wakuStoreModalComponent )
}
Component {
id: wakuStoreModalComponent
WakuStoreModal {
messagingStore: root . messagingStore
advancedStore: root . advancedStore
}
}
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
}
2024-04-29 12:02:19 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Enable translations" )
isSwitch: true
switchChecked: localAppSettings . translationsEnabled
onClicked: {
localAppSettings . translationsEnabled = ! localAppSettings . translationsEnabled
if ( ! checked )
Global . openPopup ( disableLanguagesPopupComponent )
}
}
Component {
id: disableLanguagesPopupComponent
ConfirmationDialog {
destroyOnClose: true
headerSettings.title: qsTr ( "Language reset" )
confirmationText: qsTr ( "Display language will be switched back to English. You must restart the application for changes to take effect." )
confirmButtonLabel: qsTr ( "Restart" )
onConfirmButtonClicked: Utils . restartApplication ( )
}
}
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
2024-02-05 17:11:27 +00:00
isEnabled: ! root . advancedStore . isRuntimeLogLevelSet
2021-12-14 18:47:32 +00:00
switchChecked: root . advancedStore . isDebugEnabled
2024-02-05 17:11:27 +00:00
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
}
2024-02-05 17:11:27 +00:00
MouseArea {
id: overlayMouseArea
anchors.fill: parent
enabled: true
hoverEnabled: true
propagateComposedEvents: true
}
StatusToolTip {
text: qsTr ( "The value is overridden with runtime options" )
visible: overlayMouseArea . containsMouse && root . advancedStore . isRuntimeLogLevelSet
delay: 1000
}
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 )
}
}
2023-02-15 08:27:18 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Fake loading screen" )
isSwitch: true
switchChecked: root . advancedStore . isFakeLoadingScreenEnabled
onClicked: {
root . advancedStore . toggleFakeLoadingScreen ( )
}
}
2023-05-08 20:00:32 +00:00
StatusSettingsLineButton {
anchors.leftMargin: 0
2023-10-03 13:30:42 +00:00
anchors.rightMargin: 0
2024-02-20 09:31:04 +00:00
text: qsTr ( "Enable Goerli as Test Network" )
2023-10-03 13:30:42 +00:00
isSwitch: true
2024-02-20 09:31:04 +00:00
switchChecked: root . advancedStore . isGoerliEnabled
2024-02-15 08:37:03 +00:00
onClicked: Global . openPopup ( enableSepoliaConfirmationDialogComponent )
2023-10-03 13:30:42 +00:00
}
StatusSettingsLineButton {
anchors.leftMargin: 0
2023-10-10 10:31:45 +00:00
anchors.rightMargin: 0
2024-04-19 13:07:01 +00:00
objectName: "manageCommunitiesOnTestnetButton"
2023-10-10 10:31:45 +00:00
text: qsTr ( "Manage communities on testnet" )
isSwitch: true
switchChecked: root . advancedStore . isManageCommunityOnTestModeEnabled
onClicked: {
root . advancedStore . toggleManageCommunityOnTestnet ( )
}
}
StatusSettingsLineButton {
2024-05-21 08:53:33 +00:00
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "Enable community tokens refreshing" )
isSwitch: true
switchChecked: root . advancedStore . refreshTokenEnabled
onClicked: {
root . advancedStore . toggleRefreshTokenEnabled ( )
}
}
StatusSettingsLineButton {
2023-10-10 10:31:45 +00:00
anchors.leftMargin: 0
2023-05-08 20:00:32 +00:00
anchors.rightMargin: 0
text: qsTr ( "How many log files to keep archived" )
currentValue: root . advancedStore . logMaxBackups
onClicked: {
Global . openPopup ( changeNumberOfLogsArchived )
}
}
2024-02-07 13:47:28 +00:00
StatusSettingsLineButton {
id: rpcStatsButton
anchors.leftMargin: 0
anchors.rightMargin: 0
text: qsTr ( "RPC statistics" )
onClicked: rpcStatsModal . open ( )
}
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
2023-04-26 15:46:04 +00:00
Component {
id: wakuNodesModalComponent
WakuNodesModal {
messagingStore: root . messagingStore
advancedStore: root . advancedStore
}
}
2024-02-15 08:37:03 +00:00
Component {
id: enableSepoliaConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
destroyOnClose: true
showCancelButton: true
confirmationText: qsTr ( "Are you sure you want to toggle sepolia? The app will be restarted." )
onConfirmButtonClicked: {
2024-02-20 09:31:04 +00:00
root . advancedStore . toggleIsGoerliEnabled ( )
2024-02-15 08:37:03 +00:00
close ( )
2024-04-29 12:02:19 +00:00
Utils . restartApplication ( )
2024-02-15 08:37:03 +00:00
}
onCancelButtonClicked: {
close ( )
}
}
}
2022-02-02 22:06:23 +00:00
Component {
id: enableDeveloperFeaturesConfirmationDialogComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
2023-09-25 16:18:22 +00:00
destroyOnClose: true
2022-02-02 22:06:23 +00:00
showCancelButton: true
2023-06-15 18:34:25 +00:00
confirmationText: qsTr ( "Are you sure you want to enable all the developer features? The app will be restarted." )
2022-02-02 22:06:23 +00:00
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
2023-09-25 16:18:22 +00:00
destroyOnClose: true
2021-11-04 14:41:25 +00:00
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
2023-09-25 16:18:22 +00:00
destroyOnClose: true
2021-11-24 14:20:05 +00:00
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
2023-09-25 16:18:22 +00:00
destroyOnClose: true
2021-11-11 16:22:03 +00:00
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 ( )
}
}
}
2024-02-20 19:07:22 +00:00
Component {
id: enableNimbusProxyComponent
ConfirmationDialog {
property bool mode: false
id: confirmDialog
destroyOnClose: true
showCancelButton: true
confirmationText: qsTr ( "Are you sure you want to %1 Nimbus proxy? You need to restart the app for this change to take effect." ) . arg ( root . advancedStore . isNimbusProxyEnabled ?
qsTr ( "disable" ) :
qsTr ( "enable" ) )
onConfirmButtonClicked: {
root . advancedStore . toggleNimbusProxy ( )
close ( )
}
onCancelButtonClicked: {
close ( )
}
}
}
2023-05-08 20:00:32 +00:00
Component {
id: changeNumberOfLogsArchived
StatusModal {
id: logChangerModal
onClosed: destroy ( )
anchors.centerIn: parent
width: 400
2023-05-23 12:46:16 +00:00
headerSettings.title: qsTr ( "How many log files do you want to keep archived?" )
2023-05-08 20:00:32 +00:00
contentItem: Column {
width: parent . width
StatusBaseText {
width: parent . width
padding: 15
wrapMode: Text . WordWrap
text: qsTr ( "Choose a number between 1 and 100" )
}
2024-04-15 05:28:29 +00:00
StatusAmountInput {
2023-05-08 20:00:32 +00:00
id: numberInput
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: Style . current . padding
anchors.rightMargin: Style . current . padding
label: qsTr ( "Number of archives files" )
input.text: root . advancedStore . logMaxBackups
placeholderText: qsTr ( "Number between 1 and 100" )
validators: [
2024-04-15 05:28:29 +00:00
StatusIntValidator {
2023-05-08 20:00:32 +00:00
bottom: 1
top: 100
errorMessage: qsTr ( "Number needs to be between 1 and 100" )
locale: LocaleUtils . userInputLocale
}
]
}
StatusBaseText {
width: parent . width
padding: 15
wrapMode: Text . WordWrap
text: qsTr ( "This change will only come into action after a restart" )
}
}
rightButtons: [
StatusButton {
text: qsTr ( "Cancel" )
onClicked: logChangerModal . close ( )
normalColor: "transparent"
hoverColor: "transparent"
} ,
StatusButton {
id: banButton
text: qsTr ( "Change" )
type: StatusBaseButton . Type . Normal
onClicked: {
root . advancedStore . setMaxLogBackups ( numberInput . input . text )
logChangerModal . 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
2023-06-15 18:34:25 +00:00
confirmationText: d . experimentalFeatureMessage
2022-04-04 11:26:30 +00:00
confirmButtonLabel: qsTr ( "I understand" )
2024-07-02 07:24:03 +00:00
confirmButtonObjectName: "leaveGroupConfirmationDialogLeaveButton"
2021-08-06 12:25:51 +00:00
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
}
2023-04-07 15:06:41 +00:00
ScrollingModal {
id: scrollingModal
title: labelScrolling . text
initialVelocity: root . advancedStore . scrollVelocity
initialDeceleration: root . advancedStore . scrollDeceleration
isCustomScrollingEnabled: root . advancedStore . isCustomScrollingEnabled
onVelocityChanged: root . advancedStore . setScrollVelocity ( value )
onDecelerationChanged: root . advancedStore . setScrollDeceleration ( value )
onCustomScrollingChanged: root . advancedStore . setCustomScrollingEnabled ( enabled )
}
2024-02-07 13:47:28 +00:00
RPCStatsModal {
id: rpcStatsModal
walletStore: root . walletStore
title: rpcStatsButton . text
}
2021-04-23 10:22:07 +00:00
}
2020-06-18 12:03:11 +00:00
}