(settings): moved waku nodes option to advanced

Closes #9687
This commit is contained in:
Alexandra Betouni 2023-04-26 18:46:04 +03:00
parent 606598735e
commit 38691da02c
3 changed files with 41 additions and 45 deletions

View File

@ -246,6 +246,7 @@ StatusSectionLayout {
implicitWidth: parent.width
implicitHeight: parent.height
messagingStore: root.store.messagingStore
advancedStore: root.store.advancedStore
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced)
contentWidth: d.contentWidth

View File

@ -12,6 +12,8 @@ import shared.status 1.0
import StatusQ.Core 0.1
import StatusQ.Popups.Dialog 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import "../stores"
@ -22,6 +24,7 @@ import "../panels"
SettingsContentBase {
id: root
property MessagingStore messagingStore
property AdvancedStore advancedStore
Item {
@ -132,6 +135,21 @@ SettingsContentBase {
}
}
Separator {
width: parent.width
}
StatusSectionHeadline {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: Style.current.padding
anchors.rightMargin: Style.current.padding
visible: root.advancedStore.isWakuV2 && root.advancedStore.fleet != Constants.status_prod
text: qsTr("WakuV2 options")
topPadding: Style.current.bigPadding
bottomPadding: Style.current.padding
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
anchors.leftMargin: 0
@ -145,6 +163,20 @@ SettingsContentBase {
}
}
StatusListItem {
anchors.left: parent.left
anchors.right: parent.right
title: qsTr("Waku Nodes")
visible: root.advancedStore.isWakuV2
components: [
StatusIcon {
icon: "next"
color: Theme.palette.baseColor1
}
]
onClicked: Global.openPopup(wakuNodesModalComponent)
}
StatusSectionHeadline {
anchors.left: parent.left
anchors.right: parent.right
@ -233,17 +265,6 @@ SettingsContentBase {
}
}
StatusSectionHeadline {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: Style.current.padding
anchors.rightMargin: Style.current.padding
visible: root.advancedStore.isWakuV2 && root.advancedStore.fleet != Constants.status_prod
text: qsTr("WakuV2 mode")
topPadding: Style.current.bigPadding
bottomPadding: Style.current.padding
}
Row {
anchors.left: parent.left
anchors.right: parent.right
@ -403,6 +424,14 @@ SettingsContentBase {
advancedStore: root.advancedStore
}
Component {
id: wakuNodesModalComponent
WakuNodesModal {
messagingStore: root.messagingStore
advancedStore: root.advancedStore
}
}
Component {
id: enableDeveloperFeaturesConfirmationDialogComponent
ConfirmationDialog {

View File

@ -328,12 +328,6 @@ SettingsContentBase {
}
// SYNC WAKU SECTION
StatusSectionHeadline {
Layout.fillWidth: true
Layout.leftMargin: Style.current.padding
Layout.rightMargin: Style.current.padding
text: qsTr("Message syncing")
}
StatusListItem {
Layout.fillWidth: true
@ -355,33 +349,5 @@ SettingsContentBase {
advancedStore: root.advancedStore
}
}
StatusListItem {
Layout.fillWidth: true
title: qsTr("Waku Nodes")
visible: root.advancedStore.isWakuV2
components: [
StatusIcon {
icon: "next"
color: Theme.palette.baseColor1
}
]
onClicked: Global.openPopup(wakuNodesModalComponent)
}
Component {
id: wakuNodesModalComponent
WakuNodesModal {
messagingStore: root.messagingStore
advancedStore: root.advancedStore
}
}
StatusSectionHeadline {
Layout.fillWidth: true
Layout.leftMargin: Style.current.padding
Layout.rightMargin: Style.current.padding
text: qsTr("For security reasons, private chat history won't be synced.")
}
}
}