mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 14:54:48 +00:00
b3f8af8e06
Qml code referring to the old code base commented out, but not deleted, due to easier refactoring the rest of the app.
166 lines
5.0 KiB
QML
166 lines
5.0 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import utils 1.0
|
|
import shared 1.0
|
|
import shared.panels 1.0
|
|
import shared.popups 1.0
|
|
import shared.status 1.0
|
|
|
|
import "../controls"
|
|
import "../panels"
|
|
|
|
import StatusQ.Controls 0.1 as StatusQControls
|
|
|
|
// TODO: replace with StatusQ component
|
|
ModalPopup {
|
|
id: popup
|
|
//% "Network"
|
|
title: qsTrId("network")
|
|
|
|
property string newNetwork: "";
|
|
|
|
ScrollView {
|
|
id: svNetworks
|
|
width: parent.width
|
|
height: 300
|
|
clip: true
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
|
|
Column {
|
|
id: column
|
|
spacing: Style.current.padding
|
|
width: parent.width
|
|
|
|
ButtonGroup { id: networkSettings }
|
|
|
|
Item {
|
|
id: addNetwork
|
|
width: parent.width
|
|
height: addButton.height
|
|
|
|
StatusQControls.StatusRoundButton {
|
|
id: addButton
|
|
width: 40
|
|
height: 40
|
|
icon.name: "add"
|
|
type: StatusQControls.StatusRoundButton.Type.Secondary
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
StyledText {
|
|
id: usernameText
|
|
//% "Add network"
|
|
text: qsTrId("add-network")
|
|
color: Style.current.blue
|
|
anchors.left: addButton.right
|
|
anchors.leftMargin: Style.current.padding
|
|
anchors.verticalCenter: addButton.verticalCenter
|
|
font.pixelSize: 15
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
cursorShape: Qt.PointingHandCursor
|
|
onClicked: Global.openPopup(addNetworkPopupComponent)
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: addNetworkPopupComponent
|
|
NewCustomNetworkModal {
|
|
anchors.centerIn: parent
|
|
onClosed: {
|
|
destroy()
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
spacing: Style.current.smallPadding
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.leftMargin: Style.current.padding
|
|
anchors.rightMargin: Style.current.padding
|
|
|
|
ButtonGroup {
|
|
id: radioGroup
|
|
}
|
|
|
|
|
|
StatusSectionHeadline {
|
|
//% "Main networks"
|
|
text: qsTrId("main-networks")
|
|
}
|
|
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkMainnet
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkPOA
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkXDai
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
StatusSectionHeadline {
|
|
//% "Test networks"
|
|
text: qsTrId("test-networks")
|
|
anchors.leftMargin: -Style.current.padding
|
|
anchors.rightMargin: -Style.current.padding
|
|
}
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkGoerli
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkRinkeby
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
NetworkRadioSelector {
|
|
network: Constants.networkRopsten
|
|
buttonGroup: radioGroup
|
|
}
|
|
|
|
StatusSectionHeadline {
|
|
//% "Custom Networks"
|
|
text: qsTrId("custom-networks")
|
|
anchors.leftMargin: -Style.current.padding
|
|
anchors.rightMargin: -Style.current.padding
|
|
}
|
|
|
|
// Not Refactored Yet
|
|
// Repeater {
|
|
// model: profileModel.network.customNetworkList
|
|
// delegate: NetworkRadioSelector {
|
|
// networkName: name
|
|
// network: customNetworkId
|
|
// buttonGroup: radioGroup
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
|
|
StyledText {
|
|
anchors.top: svNetworks.bottom
|
|
anchors.topMargin: Style.current.padding
|
|
//% "Under development\nNOTE: You will be logged out and all installed\nsticker packs will be removed and will\nneed to be reinstalled. Purchased sticker\npacks will not need to be re-purchased."
|
|
text: qsTrId("under-development-nnote--you-will-be-logged-out-and-all-installed-nsticker-packs-will-be-removed-and-will-nneed-to-be-reinstalled--purchased-sticker-npacks-will-not-need-to-be-re-purchased-")
|
|
}
|
|
}
|