diff --git a/src/nim_status_client.nim b/src/nim_status_client.nim index a947a14893..5012dcffd0 100644 --- a/src/nim_status_client.nim +++ b/src/nim_status_client.nim @@ -1,4 +1,4 @@ -import NimQml, eventemitter, chronicles +import NimQml, eventemitter, chronicles, os import app/chat/core as chat import app/wallet/core as wallet @@ -57,6 +57,10 @@ proc mainProc() = engine.setRootContextProperty("loginModel", login.variant) engine.setRootContextProperty("onboardingModel", onboarding.variant) + let isExperimental = if getEnv("EXPERIMENTAL") == "1": "1" else: "0" # value explicity passed to avoid trusting input + let experimentalFlag = newQVariant(isExperimental) + engine.setRootContextProperty("isExperimental", experimentalFlag) + defer: error "TODO: if user is logged in, logout" engine.delete() diff --git a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml index 16d219c53d..8726ea51ee 100644 --- a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml @@ -23,11 +23,31 @@ Item { } RowLayout { - id: browserTabSettings + id: walletTabSettings anchors.top: element7.bottom anchors.topMargin: 20 anchors.left: parent.left anchors.leftMargin: 24 + StyledText { + text: qsTr("Wallet Tab") + } + Switch { + checked: walletBtn.enabled + onCheckedChanged: function(value) { + walletBtn.enabled = this.checked + } + } + StyledText { + text: qsTr("NOT RECOMMENDED - Use at your own risk") + } + } + + RowLayout { + id: browserTabSettings + anchors.top: walletTabSettings.bottom + anchors.topMargin: 20 + anchors.left: parent.left + anchors.leftMargin: 24 StyledText { text: qsTr("Browser Tab") } diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index d6ee4bdae6..b1f764dae3 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -59,10 +59,12 @@ RowLayout { TabButton { id: walletBtn + enabled: isExperimental === "1" + visible: this.enabled width: 40 - height: 40 + height: this.enabled ? 40 : 0 text: "" - anchors.topMargin: 50 + anchors.topMargin: this.enabled ? 50 : 0 anchors.horizontalCenter: parent.horizontalCenter anchors.top: chatBtn.top background: Rectangle { @@ -84,6 +86,7 @@ RowLayout { TabButton { id: browserBtn + enabled: isExperimental === "1" visible: this.enabled width: 40 height: this.enabled ? 40 : 0 @@ -135,6 +138,7 @@ RowLayout { TabButton { id: nodeBtn + enabled: isExperimental === "1" visible: this.enabled width: 40 height: this.enabled ? 40 : 0 diff --git a/ui/onboarding/Intro.qml b/ui/onboarding/Intro.qml index 4c2c0ecda8..e46e057a3d 100644 --- a/ui/onboarding/Intro.qml +++ b/ui/onboarding/Intro.qml @@ -2,6 +2,7 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import "../shared" +import "../imports" RowLayout { property alias btnGetStarted: btnGetStarted @@ -75,7 +76,7 @@ RowLayout { text: qsTr("Thanks for trying Status Desktop! Please note that this is an alpha release and we advise you that using this app should be done for testing purposes only and you assume the full responsibility for all risks concerning your data and funds. Status makes no claims of security or integrity of funds in these builds.") font.bold: true anchors.top: rctPageIndicator.bottom - anchors.topMargin: 10 + anchors.topMargin: 5 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 14 font.letterSpacing: 0.1 @@ -84,11 +85,21 @@ RowLayout { color: Theme.black } + CheckBox { + id: warningCheckBox + anchors.top: warningMessage.bottom + anchors.topMargin: 0 + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("I understand") + } + StyledButton { id: btnGetStarted - label: "I understand" - anchors.top: warningMessage.bottom - anchors.topMargin: 17 + enabled: warningCheckBox.checked + btnColor: this.enabled ? Theme.lightBlue : "lightgrey" + label: "Get Started" + anchors.top: warningCheckBox.bottom + anchors.topMargin: 5 anchors.horizontalCenter: parent.horizontalCenter width: 146 height: 44 @@ -99,7 +110,7 @@ RowLayout { x: 772 text: qsTr("Status does not collect, share or sell any personal data. By continuing you agree with the privacy policy.") anchors.top: btnGetStarted.bottom - anchors.topMargin: 17 + anchors.topMargin: 8 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 font.letterSpacing: 0.1