status-desktop/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml

183 lines
5.4 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
2020-11-03 21:04:57 +00:00
import QtGraphicalEffects 1.13
2020-05-27 21:28:25 +00:00
import "../../../../imports"
import "../../../../shared"
2020-09-17 16:42:59 +00:00
import "../../../../shared/status"
2020-05-27 21:28:25 +00:00
Item {
id: advancedContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
2020-05-27 21:28:25 +00:00
Column {
id: generalColumn
2020-05-27 21:28:25 +00:00
anchors.top: parent.top
anchors.topMargin: topMargin
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
2021-01-19 20:51:16 +00:00
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Network"
text: qsTrId("network")
2021-01-19 20:51:16 +00:00
currentValue: utilsModel.getNetworkName()
onClicked: networksModal.open()
}
2021-01-19 20:51:16 +00:00
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Fleet"
text: qsTrId("fleet")
2021-01-19 20:51:16 +00:00
currentValue: profileModel.fleets.fleet
onClicked: fleetModal.open()
}
2021-02-22 22:10:47 +00:00
StatusSettingsLineButton {
text: qsTr("Minimize on close")
isSwitch: true
switchChecked: !appSettings.quitOnClose
onClicked: function (checked) {
appSettings.quitOnClose = !checked
}
}
2021-01-19 20:51:16 +00:00
Item {
id: spacer1
height: Style.current.bigPadding
width: parent.width
}
Separator {
anchors.topMargin: Style.current.bigPadding
anchors.left: parent.left
anchors.leftMargin: -Style.current.padding
anchors.right: parent.right
anchors.rightMargin: -Style.current.padding
}
StatusSectionHeadline {
2021-02-18 16:36:05 +00:00
//% "Experimental features"
text: qsTrId("experimental-features")
2021-01-19 20:51:16 +00:00
topPadding: Style.current.bigPadding
bottomPadding: Style.current.padding
}
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Wallet"
text: qsTrId("wallet")
isSwitch: true
2021-04-23 11:43:18 +00:00
switchChecked: appSettings.isWalletEnabled
onClicked: {
2021-04-23 11:43:18 +00:00
if (!appSettings.isWalletEnabled) {
confirmationPopup.settingsProp = "isWalletEnabled"
confirmationPopup.open()
} else {
2021-04-23 11:43:18 +00:00
appSettings.isWalletEnabled = false
}
2020-09-22 15:12:48 +00:00
}
}
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Dapp Browser"
text: qsTrId("dapp-browser")
isSwitch: true
2021-04-23 11:43:18 +00:00
switchChecked: appSettings.isBrowserEnabled
onClicked: {
2021-04-23 11:43:18 +00:00
if (!appSettings.isBrowserEnabled) {
confirmationPopup.settingsProp = "isBrowserEnabled"
confirmationPopup.open()
} else {
2021-04-23 11:43:18 +00:00
appSettings.isBrowserEnabled = false
}
}
}
2020-11-23 19:14:48 +00:00
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Communities"
text: qsTrId("communities")
isSwitch: true
switchChecked: appSettings.communitiesEnabled
onClicked: {
if (!appSettings.communitiesEnabled) {
confirmationPopup.settingsProp = "communitiesEnabled"
confirmationPopup.open()
} else {
appSettings.communitiesEnabled = false
}
}
2020-11-23 19:14:48 +00:00
}
StatusSettingsLineButton {
text: qsTr("Activity Center")
isSwitch: true
switchChecked: appSettings.isActivityCenterEnabled
onClicked: {
if (!appSettings.isActivityCenterEnabled) {
confirmationPopup.settingsProp = "isActivityCenterEnabled"
confirmationPopup.open()
} else {
appSettings.isActivityCenterEnabled = false
}
}
}
2021-06-30 18:46:26 +00:00
StatusSettingsLineButton {
text: qsTr("Online users")
isSwitch: true
switchChecked: appSettings.showOnlineUsers
onClicked: {
appSettings.showOnlineUsers = !appSettings.showOnlineUsers
}
}
2021-05-05 20:27:23 +00:00
// StatusSettingsLineButton {
// //% "Node Management"
// text: qsTrId("node-management")
// isSwitch: true
// switchChecked: appSettings.nodeManagementEnabled
// onClicked: {
// if (!appSettings.nodeManagementEnabled) {
// confirmationPopup.settingsProp = "nodeManagementEnabled"
// confirmationPopup.open()
// } else {
// appSettings.nodeManagementEnabled = false
// }
// }
// }
}
2020-08-25 09:00:03 +00:00
NetworksModal {
id: networksModal
2020-11-03 21:04:57 +00:00
}
FleetsModal {
id: fleetModal
}
2020-08-25 09:00:03 +00:00
ConfirmationDialog {
id: confirmationPopup
property string settingsProp: ""
height: 310
showCancelButton: true
confirmationText: qsTr("This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk.")
confirmButtonLabel: qsTr("I understand")
onConfirmButtonClicked: {
appSettings[settingsProp] = true
settingsProp = ""
close()
}
onCancelButtonClicked: {
close()
}
}
}
/*##^##
Designer {
D{i:0;height:400;width:700}
2020-05-27 21:28:25 +00:00
}
##^##*/