2022-03-25 09:09:49 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: root
|
|
|
|
|
2022-10-25 13:57:04 +00:00
|
|
|
property var accountSettings
|
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
StatusBaseText {
|
|
|
|
text: qsTr("Default DApp explorer")
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: explorerGroup
|
|
|
|
buttons: [
|
|
|
|
noneRadioButton,
|
|
|
|
etherscanRadioButton,
|
|
|
|
ethplorerRadioButton,
|
|
|
|
blockchairRadioButton
|
|
|
|
]
|
|
|
|
exclusive: true
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
id: noneRadioButton
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
Layout.topMargin: 10
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerNone
|
|
|
|
text: qsTr("None")
|
2022-03-25 09:09:49 +00:00
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerNone
|
2022-03-25 09:09:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
id: etherscanRadioButton
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
Layout.topMargin: 10
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEtherscan
|
2022-03-25 09:09:49 +00:00
|
|
|
text: "etherscan.io"
|
|
|
|
onCheckedChanged: {
|
2022-10-25 13:57:04 +00:00
|
|
|
if (checked && accountSettings.useBrowserEthereumExplorer !== Constants.browserEthereumExplorerEtherscan) {
|
|
|
|
accountSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEtherscan
|
2022-03-25 09:09:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
id: ethplorerRadioButton
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
Layout.topMargin: 10
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEthplorer
|
2022-03-25 09:09:49 +00:00
|
|
|
text: "ethplorer.io"
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEthplorer
|
2022-03-25 09:09:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
id: blockchairRadioButton
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
Layout.topMargin: 10
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerBlockchair
|
2022-03-25 09:09:49 +00:00
|
|
|
text: "blockchair.com"
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerBlockchair
|
2022-03-25 09:09:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Column
|