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
|
|
|
|
2020-10-21 14:49:13 +00:00
|
|
|
Column {
|
2021-01-04 20:26:56 +00:00
|
|
|
id: generalColumn
|
|
|
|
spacing: Style.current.bigPadding
|
2020-12-29 15:31:26 +00:00
|
|
|
anchors.top: parent.top
|
2021-01-04 21:40:59 +00:00
|
|
|
anchors.topMargin: 46
|
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
|
2020-12-29 15:31:26 +00:00
|
|
|
|
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("General")
|
|
|
|
}
|
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Homepage")
|
2021-01-04 20:34:46 +00:00
|
|
|
currentValue: appSettings.browserHomepage === "" ? qsTr("Default") : appSettings.browserHomepage
|
|
|
|
onClicked: homePagePopup.createObject(root).open()
|
2021-01-04 20:26:56 +00:00
|
|
|
}
|
|
|
|
|
2020-12-29 15:31:26 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Show favorites bar")
|
|
|
|
isSwitch: true
|
|
|
|
switchChecked: appSettings.showFavoritesBar
|
|
|
|
onClicked: function (checked) {
|
|
|
|
appSettings.showFavoritesBar = checked
|
|
|
|
}
|
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Search engine used in the address bar")
|
2021-01-04 21:06:38 +00:00
|
|
|
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")
|
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
2021-01-04 21:06:38 +00:00
|
|
|
onClicked: searchEngineModal.createObject(root).open()
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
Item {
|
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
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
|
|
|
|
anchors.top: ethereumExplorerBtn.bottom
|
|
|
|
anchors.topMargin: 2
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 150
|
|
|
|
wrapMode: Text.WordWrap
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-04 21:35:16 +00:00
|
|
|
// TODO redd this when we figure out how to set the download path for the browser
|
|
|
|
// Separator {}
|
|
|
|
|
|
|
|
// StatusSectionHeadline {
|
|
|
|
// text: qsTr("Downloads")
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// Item {
|
|
|
|
// height: textItem.height
|
|
|
|
// width: parent.width
|
|
|
|
|
|
|
|
// StyledText {
|
|
|
|
// id: textItem
|
|
|
|
// text: qsTr("Location")
|
|
|
|
// font.pixelSize: 15
|
|
|
|
// }
|
|
|
|
|
|
|
|
// StyledText {
|
|
|
|
// id: valueText
|
|
|
|
// text: "path/to/downloads"
|
|
|
|
// font.pixelSize: 15
|
|
|
|
// color: Style.current.secondaryText
|
|
|
|
// anchors.right: locationBtn.left
|
|
|
|
// anchors.rightMargin: Style.current.halfPadding
|
|
|
|
// anchors.verticalCenter: textItem.verticalCenter
|
|
|
|
// }
|
|
|
|
|
|
|
|
// StatusButton {
|
|
|
|
// id: locationBtn
|
|
|
|
// text: qsTr("Change")
|
|
|
|
// anchors.right: parent.right
|
|
|
|
// anchors.verticalCenter: textItem.verticalCenter
|
|
|
|
// onClicked: {
|
|
|
|
// console.log('change location')
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
2020-10-21 14:49:13 +00:00
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
Separator {}
|
|
|
|
|
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Privacy")
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-01-04 20:26:56 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Set DApp access permissions")
|
|
|
|
onClicked: dappListPopup.createObject(root).open()
|
|
|
|
}
|
|
|
|
}
|
2020-10-21 14:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;height:400;width:700}
|
|
|
|
}
|
|
|
|
##^##*/
|