2020-10-21 14:45:28 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
2021-01-04 20:26:56 +00:00
|
|
|
import "Privileges/"
|
2021-01-04 20:34:46 +00:00
|
|
|
import "BrowserModals"
|
2020-10-21 14:45:28 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
property Component dappListPopup: DappList {
|
|
|
|
onClosed: destroy()
|
|
|
|
}
|
2021-01-04 20:34:46 +00:00
|
|
|
property Component homePagePopup: HomepageModal {}
|
2021-01-04 21:06:38 +00:00
|
|
|
property Component searchEngineModal: SearchEngineModal {}
|
2021-01-04 21:23:20 +00:00
|
|
|
property Component ethereumExplorerModal: EthereumExplorerModal {}
|
2021-01-04 20:34:46 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
Item {
|
2020-12-29 15:31:26 +00:00
|
|
|
anchors.top: parent.top
|
2021-01-18 20:25:20 +00:00
|
|
|
anchors.topMargin: topMargin
|
2020-10-21 14:49:13 +00:00
|
|
|
anchors.left: parent.left
|
2020-12-29 15:31:26 +00:00
|
|
|
anchors.leftMargin: contentMargin
|
2021-01-04 20:26:56 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: contentMargin
|
2021-01-19 20:26:01 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2020-12-29 15:31:26 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
Column {
|
|
|
|
id: generalColumn
|
|
|
|
width: parent.width
|
2020-12-29 15:31:26 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("General")
|
|
|
|
bottomPadding: Style.current.bigPadding
|
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Homepage")
|
|
|
|
currentValue: appSettings.browserHomepage === "" ? qsTr("Default") : appSettings.browserHomepage
|
|
|
|
onClicked: homePagePopup.createObject(root).open()
|
2020-12-29 15:31:26 +00:00
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Show favorites bar")
|
|
|
|
isSwitch: true
|
|
|
|
switchChecked: appSettings.showFavoritesBar
|
|
|
|
onClicked: function (checked) {
|
|
|
|
appSettings.showFavoritesBar = checked
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Search engine used in the address bar")
|
|
|
|
currentValue: {
|
|
|
|
switch (appSettings.browserSearchEngine) {
|
|
|
|
case Constants.browserSearchEngineGoogle: return "Google"
|
|
|
|
case Constants.browserSearchEngineYahoo: return "Yahoo!"
|
|
|
|
case Constants.browserSearchEngineDuckDuckGo: return "DuckDuckGo"
|
|
|
|
case Constants.browserSearchEngineNone:
|
|
|
|
default: return qsTr("None")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onClicked: searchEngineModal.createObject(root).open()
|
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
|
|
|
|
StatusSettingsLineButton {
|
|
|
|
id: ethereumExplorerBtn
|
|
|
|
text: qsTr("Ethereum explorer used in the address bar")
|
2021-01-04 21:23:20 +00:00
|
|
|
currentValue: {
|
|
|
|
switch (appSettings.browserEthereumExplorer) {
|
|
|
|
case Constants.browserEthereumExplorerEtherscan: return "etherscan.io"
|
|
|
|
case Constants.browserEthereumExplorerEthplorer: return "ethplorer.io"
|
|
|
|
case Constants.browserEthereumExplorerBlockchair: return "blockchair.com"
|
|
|
|
case Constants.browserSearchEngineNone:
|
|
|
|
default: return qsTr("None")
|
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
2021-01-04 21:23:20 +00:00
|
|
|
onClicked: ethereumExplorerModal.createObject(root).open()
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
StyledText {
|
2021-01-04 20:26:56 +00:00
|
|
|
text: qsTr("Open an ethereum explorer after a transaction hash or an address is entered")
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Style.current.secondaryText
|
2021-01-19 20:26:01 +00:00
|
|
|
width: parent.width - 150
|
2021-01-04 20:26:56 +00:00
|
|
|
wrapMode: Text.WordWrap
|
2021-01-19 20:26:01 +00:00
|
|
|
bottomPadding: Style.current.bigPadding
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
Separator {
|
|
|
|
id: separator1
|
|
|
|
anchors.topMargin: Style.current.bigPadding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: -Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: -Style.current.padding
|
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Privacy")
|
|
|
|
topPadding: Style.current.bigPadding
|
|
|
|
bottomPadding: Style.current.padding
|
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Set DApp access permissions")
|
|
|
|
isSwitch: false
|
|
|
|
onClicked: {
|
|
|
|
dappListPopup.createObject(root).open()
|
|
|
|
}
|
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
}
|
|
|
|
}
|
2020-10-21 14:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;height:400;width:700}
|
|
|
|
}
|
|
|
|
##^##*/
|