2022-03-25 09:09:49 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
2021-10-06 09:16:39 +00:00
|
|
|
|
|
|
|
import "../popups"
|
2022-03-25 09:09:49 +00:00
|
|
|
import "../stores"
|
|
|
|
import "browser"
|
|
|
|
import "wallet"
|
2020-10-21 14:45:28 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
ScrollView {
|
2020-10-21 14:45:28 +00:00
|
|
|
id: root
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2021-04-08 15:44:58 +00:00
|
|
|
clip: true
|
2020-10-21 14:45:28 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
property ProfileSectionStore store
|
|
|
|
property real profileContentWidth
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2021-01-04 21:06:38 +00:00
|
|
|
property Component searchEngineModal: SearchEngineModal {}
|
2021-01-04 20:34:46 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
contentHeight: rootItem.height
|
2021-04-08 15:44:58 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
Item {
|
|
|
|
id: rootItem
|
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
2020-12-29 15:31:26 +00:00
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
Column {
|
2022-03-25 09:09:49 +00:00
|
|
|
id: layout
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 48
|
|
|
|
width: profileContentWidth
|
|
|
|
spacing: 10
|
|
|
|
StatusBaseText {
|
|
|
|
id: titleText
|
|
|
|
text: qsTr("Browser")
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 28
|
|
|
|
color: Theme.palette.directColor1
|
2021-01-19 20:26:01 +00:00
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
Item {
|
|
|
|
height: 25
|
|
|
|
width: 1
|
2020-12-29 15:31:26 +00:00
|
|
|
}
|
2020-10-21 14:49:13 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
HomePageView {
|
|
|
|
id: homePageView
|
|
|
|
homepage: localAccountSensitiveSettings.browserHomepage
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
// TODO: Replace with StatusQ StatusListItem component
|
2021-01-19 20:26:01 +00:00
|
|
|
StatusSettingsLineButton {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Search engine used in the address bar"
|
|
|
|
text: qsTrId("search-engine-used-in-the-address-bar")
|
2021-01-19 20:26:01 +00:00
|
|
|
currentValue: {
|
2021-10-20 09:50:50 +00:00
|
|
|
switch (localAccountSensitiveSettings.shouldShowBrowserSearchEngine) {
|
2021-01-19 20:26:01 +00:00
|
|
|
case Constants.browserSearchEngineGoogle: return "Google"
|
|
|
|
case Constants.browserSearchEngineYahoo: return "Yahoo!"
|
|
|
|
case Constants.browserSearchEngineDuckDuckGo: return "DuckDuckGo"
|
|
|
|
case Constants.browserSearchEngineNone:
|
2022-03-25 09:09:49 +00:00
|
|
|
//% "None"
|
2021-02-18 16:36:05 +00:00
|
|
|
default: return qsTrId("none")
|
2021-01-19 20:26:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
onClicked: searchEngineModal.createObject(root).open()
|
|
|
|
}
|
2021-01-04 20:26:56 +00:00
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
DefaultDAppExplorerView {
|
|
|
|
id: dAppExplorerView
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
2022-03-25 09:09:49 +00:00
|
|
|
|
|
|
|
StatusListItem {
|
|
|
|
id: showFavouritesItem
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: parent.width + Style.current.padding * 2
|
|
|
|
title: qsTr("Show Favorites Bar")
|
|
|
|
components: [
|
|
|
|
StatusSwitch {
|
|
|
|
checked: localAccountSensitiveSettings.shouldShowFavoritesBar
|
|
|
|
onCheckedChanged: {
|
|
|
|
localAccountSensitiveSettings.shouldShowFavoritesBar = checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-10-21 14:49:13 +00:00
|
|
|
}
|
|
|
|
|
2021-01-19 20:26:01 +00:00
|
|
|
Separator {
|
|
|
|
id: separator1
|
|
|
|
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
|
|
|
|
2022-03-25 09:09:49 +00:00
|
|
|
StatusBaseText {
|
|
|
|
text: qsTr("Connected DApps")
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
PermissionsListView {
|
|
|
|
id: permissionListView
|
|
|
|
width: parent.width
|
|
|
|
walletStore: root.store.walletStore
|
2021-01-19 20:26:01 +00:00
|
|
|
}
|
2022-03-25 09:09:49 +00:00
|
|
|
} // Column
|
|
|
|
} // Item
|
|
|
|
} // ScrollView
|