2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick . Controls 2.13
import QtQuick . Layouts 1.13
2020-05-27 21:28:25 +00:00
import "../../../../imports"
2020-06-19 18:06:58 +00:00
import "../../../../shared"
2020-05-27 21:28:25 +00:00
Item {
2020-07-10 15:37:23 +00:00
property var appSettings
2020-07-14 21:23:17 +00:00
2020-05-27 21:28:25 +00:00
id: advancedContainer
width: 200
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
2020-06-19 18:06:58 +00:00
StyledText {
2020-07-01 17:35:57 +00:00
id: title
2020-07-06 20:39:55 +00:00
//% "Advanced settings"
text: qsTrId ( "advanced-settings" )
2020-05-27 21:28:25 +00:00
anchors.left: parent . left
anchors.leftMargin: 24
anchors.top: parent . top
anchors.topMargin: 24
font.weight: Font . Bold
font.pixelSize: 20
}
2020-06-18 12:03:11 +00:00
2020-07-01 17:35:57 +00:00
RowLayout {
// TODO move this to a new panel once we have the appearance panel
2020-07-02 15:05:50 +00:00
property bool isDarkTheme: {
const isDarkTheme = profileModel . profile . appearance === 1
if ( isDarkTheme ) {
Style . changeTheme ( 'dark' )
} else {
Style . changeTheme ( 'light' )
}
return isDarkTheme
}
2020-07-01 17:35:57 +00:00
id: themeSetting
anchors.top: title . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
StyledText {
2020-07-06 20:39:55 +00:00
//% "Theme (Light - Dark)"
text: qsTrId ( "theme-(light---dark)" )
2020-07-01 17:35:57 +00:00
}
Switch {
checked: themeSetting . isDarkTheme
2020-07-14 21:23:17 +00:00
onToggled: function ( ) {
2020-07-02 15:05:50 +00:00
profileModel . changeTheme ( themeSetting . isDarkTheme ? 0 : 1 )
2020-07-01 17:35:57 +00:00
}
}
}
2020-06-18 12:03:11 +00:00
RowLayout {
2020-07-14 21:23:17 +00:00
property bool isCompactMode: appSettings . compactMode
id: compactModeSetting
2020-07-01 17:35:57 +00:00
anchors.top: themeSetting . bottom
2020-06-18 12:03:11 +00:00
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
2020-07-14 21:23:17 +00:00
StyledText {
text: qsTr ( "Chat Compact Mode" )
}
Switch {
checked: compactModeSetting . isCompactMode
onToggled: function ( ) {
appSettings . compactMode = ! compactModeSetting . isCompactMode
}
}
}
RowLayout {
id: walletTabSettings
anchors.top: compactModeSetting . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
2020-06-26 14:08:08 +00:00
StyledText {
2020-07-06 20:39:55 +00:00
//% "Wallet Tab"
text: qsTrId ( "wallet-tab" )
2020-06-26 14:08:08 +00:00
}
Switch {
checked: walletBtn . enabled
onCheckedChanged: function ( value ) {
walletBtn . enabled = this . checked
}
}
StyledText {
2020-07-06 20:39:55 +00:00
//% "NOT RECOMMENDED - Use at your own risk"
text: qsTrId ( "not-recommended---use-at-your-own-risk" )
2020-06-26 14:08:08 +00:00
}
}
RowLayout {
id: browserTabSettings
anchors.top: walletTabSettings . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
2020-06-19 18:06:58 +00:00
StyledText {
2020-07-06 20:39:55 +00:00
//% "Browser Tab"
text: qsTrId ( "browser-tab" )
2020-06-18 12:03:11 +00:00
}
Switch {
checked: browserBtn . enabled
onCheckedChanged: function ( value ) {
browserBtn . enabled = this . checked
}
}
2020-06-19 18:06:58 +00:00
StyledText {
2020-07-06 20:39:55 +00:00
//% "experimental (web3 not supported yet)"
text: qsTrId ( "experimental-(web3-not-supported-yet)" )
2020-06-18 12:03:11 +00:00
}
}
RowLayout {
2020-07-10 15:37:23 +00:00
id: nodeTabSettings
2020-06-18 12:03:11 +00:00
anchors.top: browserTabSettings . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
2020-06-19 18:06:58 +00:00
StyledText {
2020-07-06 20:39:55 +00:00
//% "Node Management Tab"
text: qsTrId ( "node-management-tab" )
2020-06-18 12:03:11 +00:00
}
Switch {
checked: nodeBtn . enabled
onCheckedChanged: function ( value ) {
nodeBtn . enabled = this . checked
}
}
2020-06-19 18:06:58 +00:00
StyledText {
2020-07-06 20:39:55 +00:00
//% "under development"
text: qsTrId ( "under-development" )
2020-06-18 12:03:11 +00:00
}
}
2020-07-10 15:37:23 +00:00
RowLayout {
2020-07-16 06:23:00 +00:00
id: displayImageSettings
2020-07-10 15:37:23 +00:00
anchors.top: nodeTabSettings . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
StyledText {
text: qsTr ( "Display images in chat automatically" )
}
Switch {
checked: appSettings . displayChatImages
onCheckedChanged: function ( value ) {
advancedContainer . appSettings . displayChatImages = this . checked
}
}
StyledText {
text: qsTr ( "under development" )
}
}
2020-07-16 06:23:00 +00:00
RowLayout {
id: networkTabSettings
anchors.top: displayImageSettings . bottom
anchors.topMargin: 20
anchors.left: parent . left
anchors.leftMargin: 24
StyledText {
text: qsTr ( "Enable testnet (Ropsten)\nCurrent network: %1" ) . arg ( profileModel . network )
}
Switch {
checked: profileModel . network === "testnet_rpc"
onCheckedChanged: {
if ( checked && profileModel . network === "testnet_rpc" || ! checked && profileModel . network === "mainnet_rpc" ) {
return ;
}
profileModel . network = checked ? "testnet_rpc" : "mainnet_rpc" ;
}
}
StyledText {
text: qsTr ( "Under development\nNOTE: You will be logged out and all installed\nsticker packs will be removed and will\nneed to be reinstalled. Purchased sticker\npacks will not need to be re-purchased." )
}
}
2020-06-18 12:03:11 +00:00
}
/ * # # ^ # #
Designer {
D { i: 0 ; height: 400 ; width: 700 }
2020-05-27 21:28:25 +00:00
}
2020-06-18 12:03:11 +00:00
# # ^ # # * /