diff --git a/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml b/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml index 59c3f80568..bf95624815 100644 --- a/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml @@ -3,28 +3,39 @@ import QtQuick.Layouts 1.13 import "../../../../imports" import "../../../../shared" import "../../../../shared/status" +import "Privileges/" Item { id: root Layout.fillHeight: true Layout.fillWidth: true + property Component dappListPopup: DappList { + onClosed: destroy() + } + Column { - id: containerColumn - spacing: Style.current.padding + id: generalColumn + spacing: Style.current.bigPadding anchors.top: parent.top - anchors.topMargin: Style.current.padding - anchors.right: parent.right - anchors.rightMargin: contentMargin + anchors.topMargin: Style.current.bigPadding anchors.left: parent.left anchors.leftMargin: contentMargin - anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.rightMargin: contentMargin StatusSectionHeadline { - id: labelGeneral text: qsTr("General") } + StatusSettingsLineButton { + text: qsTr("Homepage") + currentValue: qsTr("Default") + onClicked: function () { + console.log('Change Homepage') + } + } + StatusSettingsLineButton { text: qsTr("Show favorites bar") isSwitch: true @@ -34,115 +45,98 @@ Item { } } - RowLayout { - StyledText { - text: qsTr("Autoload images") + StatusSettingsLineButton { + text: qsTr("Search engine used in the address bar") + currentValue: qsTr("None") + onClicked: function () { + console.log('Change search engine') } - StatusSwitch { - checked: appSettings.autoLoadImages - onCheckedChanged: function() { - appSettings.autoLoadImages = this.checked + } + + Item { + width: parent.width + height: childrenRect.height + + StatusSettingsLineButton { + id: ethereumExplorerBtn + text: qsTr("Ethereum explorer used in the address bar") + currentValue: qsTr("None") + onClicked: function () { + console.log('Change ethereum explorer') + } + } + StyledText { + 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 + } + } + + + + 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') } } } - RowLayout { - StyledText { - text: qsTr("JavaScript On") - } - StatusSwitch { - checked: appSettings.javaScriptEnabled - onCheckedChanged: function() { - appSettings.javaScriptEnabled = this.checked - } + StatusSettingsLineButton { + text: qsTr("Location") + currentValue: "path/to/downloads" + onClicked: function () { + console.log('Change download') } } - RowLayout { - StyledText { - text: qsTr("Error Page On") - } - StatusSwitch { - checked: appSettings.errorPageEnabled - onCheckedChanged: function() { - appSettings.errorPageEnabled = this.checked - } - } + Separator {} + + StatusSectionHeadline { + text: qsTr("Privacy") } - RowLayout { - StyledText { - text: qsTr("Plugins On") - } - StatusSwitch { - checked: appSettings.pluginsEnabled - onCheckedChanged: function() { - appSettings.pluginsEnabled = this.checked - } - } - } - - RowLayout { - StyledText { - text: qsTr("Icons On") - } - StatusSwitch { - checked: appSettings.autoLoadIconsForPage - onCheckedChanged: function() { - appSettings.autoLoadIconsForPage = this.checked - } - } - } - - RowLayout { - StyledText { - text: qsTr("Touch Icons On") - } - StatusSwitch { - checked: appSettings.touchIconsEnabled - onCheckedChanged: function() { - appSettings.touchIconsEnabled = this.checked - } - } - } - - RowLayout { - StyledText { - text: qsTr("WebRTC Public Interfaces Only") - } - StatusSwitch { - checked: appSettings.webRTCPublicInterfacesOnly - onCheckedChanged: function() { - appSettings.webRTCPublicInterfacesOnly = this.checked - } - } - } - - RowLayout { - StyledText { - text: qsTr("PDF viewer enabled") - } - StatusSwitch { - checked: appSettings.pdfViewerEnabled - onCheckedChanged: function() { - appSettings.pdfViewerEnabled = this.checked - } - } + StatusSettingsLineButton { + text: qsTr("Set DApp access permissions") + onClicked: dappListPopup.createObject(root).open() } } - - // TODO find what to do with this one - // MenuItem { - // id: httpDiskCacheEnabled - // text: "HTTP Disk Cache" - // checkable: currentWebView && !currentWebView.profile.offTheRecord - // checked: currentWebView && (currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache) - // onToggled: function(checked) { - // if (currentWebView) { - // currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache; - // } - // } - // } } /*##^## diff --git a/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml b/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml index be7fd598ba..21ce407b07 100644 --- a/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml @@ -5,7 +5,6 @@ import QtGraphicalEffects 1.13 import "../../../../imports" import "../../../../shared" import "../../../../shared/status" -import "Privileges/" Item { id: privacyContainer @@ -16,11 +15,6 @@ Item { id: previewableSites } - property Component dappListPopup: DappList { - onClosed: destroy() - } - - Column { id: containerColumn spacing: Style.current.padding @@ -86,11 +80,6 @@ Item { Layout.topMargin: Style.current.bigPadding - containerColumn.spacing } - StatusSettingsLineButton { - text: qsTr("Set DApp access permissions") - onClicked: dappListPopup.createObject(privacyContainer).open() - } - Separator { id: separator2 Layout.topMargin: Style.current.bigPadding - containerColumn.spacing