diff --git a/src/constants.nim b/src/constants.nim index c66ce4863c..b6beddd9ae 100644 --- a/src/constants.nim +++ b/src/constants.nim @@ -41,6 +41,7 @@ let WAKU_V2_PORT* = desktopConfig.defaultWakuV2Port STATUS_PORT* = desktopConfig.statusPort LOG_LEVEL* = desktopConfig.logLevel + FLEET_SELECTION_ENABLED* = desktopConfig.enableFleetSelection # build variables POKT_TOKEN_RESOLVED* = desktopConfig.poktToken diff --git a/src/env_cli_vars.nim b/src/env_cli_vars.nim index fe0cea6f92..1af8d22e52 100644 --- a/src/env_cli_vars.nim +++ b/src/env_cli_vars.nim @@ -212,6 +212,11 @@ type StatusDesktopConfig = object longdesc: "Can be one of: \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\". \"INFO\" in production build, otherwise \"DEBUG\"" name: "LOG_LEVEL" abbr: "log-level" .}: string + enableFleetSelection* {. + defaultValue: false + desc: "Determines if the fleet selection UI is enabled" + name: "ENABLE_FLEET_SELECTION" + abbr: "enable-fleet-selection" .}: bool # On macOS the first time when a user gets the "App downloaded from the diff --git a/src/nim_status_client.nim b/src/nim_status_client.nim index a2cdb2eae2..be933b5417 100644 --- a/src/nim_status_client.nim +++ b/src/nim_status_client.nim @@ -163,6 +163,7 @@ proc mainProc() = singletonInstance.engine.setRootContextProperty("uiScaleFilePath", newQVariant(uiScaleFilePath)) singletonInstance.engine.setRootContextProperty("singleInstance", newQVariant(singleInstance)) singletonInstance.engine.setRootContextProperty("isExperimental", isExperimentalQVariant) + singletonInstance.engine.setRootContextProperty("fleetSelectionEnabled", newQVariant(FLEET_SELECTION_ENABLED)) singletonInstance.engine.setRootContextProperty("signals", signalsManagerQVariant) singletonInstance.engine.setRootContextProperty("production", isProductionQVariant) diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index ad35421bee..fdc8574a81 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -318,6 +318,7 @@ StatusSectionLayout { messagingStore: root.store.messagingStore advancedStore: root.store.advancedStore walletStore: root.store.walletStore + isFleetSelectionEnabled: fleetSelectionEnabled sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced) contentWidth: d.contentWidth } diff --git a/ui/app/AppLayouts/Profile/views/AdvancedView.qml b/ui/app/AppLayouts/Profile/views/AdvancedView.qml index 4a097d8e22..c719add9f4 100644 --- a/ui/app/AppLayouts/Profile/views/AdvancedView.qml +++ b/ui/app/AppLayouts/Profile/views/AdvancedView.qml @@ -36,6 +36,8 @@ SettingsContentBase { property AdvancedStore advancedStore property WalletStore walletStore + property bool isFleetSelectionEnabled + Item { id: advancedContainer width: root.contentWidth @@ -59,6 +61,7 @@ SettingsContentBase { text: qsTr("Fleet") currentValue: root.advancedStore.fleet onClicked: fleetModal.open() + visible: root.isFleetSelectionEnabled } StatusSettingsLineButton {