2022-03-07 20:34:59 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Controls.Validators 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
import "."
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.popups 1.0
|
|
|
|
import shared.status 1.0
|
|
|
|
import shared.controls 1.0
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.Profile.stores 1.0
|
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
StatusModal {
|
2022-07-28 22:59:58 +00:00
|
|
|
id: root
|
2022-03-07 20:34:59 +00:00
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
height: 560
|
2023-05-31 20:58:23 +00:00
|
|
|
padding: 8
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: qsTr("Waku nodes")
|
2022-03-07 20:34:59 +00:00
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
property MessagingStore messagingStore
|
|
|
|
property AdvancedStore advancedStore
|
2022-08-02 18:37:27 +00:00
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
onClosed: {
|
|
|
|
destroy()
|
|
|
|
}
|
|
|
|
|
2023-05-31 20:58:23 +00:00
|
|
|
StatusScrollView {
|
|
|
|
id: scrollView
|
|
|
|
anchors.fill: parent
|
|
|
|
contentWidth: availableWidth
|
2022-03-07 20:34:59 +00:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: nodesColumn
|
2023-05-31 20:58:23 +00:00
|
|
|
width: scrollView.availableWidth
|
2022-03-07 20:34:59 +00:00
|
|
|
|
|
|
|
Repeater {
|
2022-08-02 18:37:27 +00:00
|
|
|
id: wakunodesListView
|
|
|
|
model: root.messagingStore.wakunodes
|
2022-03-07 20:34:59 +00:00
|
|
|
delegate: Component {
|
|
|
|
StatusListItem {
|
2023-05-31 20:58:23 +00:00
|
|
|
width: parent.width
|
2022-10-24 14:34:59 +00:00
|
|
|
title: qsTr("Node %1").arg(index + 1)
|
2022-08-02 18:37:27 +00:00
|
|
|
subTitle: model.nodeAddress
|
2022-03-07 20:34:59 +00:00
|
|
|
components: [
|
2022-08-02 18:37:27 +00:00
|
|
|
// TODO: add a button to delete nodes and restore default fleet nodes if necessary
|
2022-03-07 20:34:59 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
2024-07-26 16:44:20 +00:00
|
|
|
visible: false // FIXME: hide for now (https://github.com/status-im/status-go/issues/5597)
|
2022-03-07 20:34:59 +00:00
|
|
|
text: qsTr("Add a new node")
|
|
|
|
color: Theme.palette.primaryColor1
|
2022-07-28 22:59:58 +00:00
|
|
|
width: parent.width
|
2022-03-07 20:34:59 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: Global.openPopup(wakuNodeModalComponent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: wakuNodeModalComponent
|
|
|
|
AddWakuNodeModal {
|
|
|
|
messagingStore: root.messagingStore
|
2022-07-28 22:59:58 +00:00
|
|
|
advancedStore: root.advancedStore
|
2022-03-07 20:34:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|