fix: Hide fleet selection from settings
- introduce `ENABLE_FLEET_SELECTION` desktop config entry to control the Fleet selection UI availability - UI can be enabled with envvar `STATUS_RUNTIME_ENABLE_FLEET_SELECTION=1` Fixes #13848
This commit is contained in:
parent
a9b5d8fcf7
commit
29c61d8135
|
@ -41,6 +41,7 @@ let
|
||||||
WAKU_V2_PORT* = desktopConfig.defaultWakuV2Port
|
WAKU_V2_PORT* = desktopConfig.defaultWakuV2Port
|
||||||
STATUS_PORT* = desktopConfig.statusPort
|
STATUS_PORT* = desktopConfig.statusPort
|
||||||
LOG_LEVEL* = desktopConfig.logLevel
|
LOG_LEVEL* = desktopConfig.logLevel
|
||||||
|
FLEET_SELECTION_ENABLED* = desktopConfig.enableFleetSelection
|
||||||
|
|
||||||
# build variables
|
# build variables
|
||||||
POKT_TOKEN_RESOLVED* = desktopConfig.poktToken
|
POKT_TOKEN_RESOLVED* = desktopConfig.poktToken
|
||||||
|
|
|
@ -212,6 +212,11 @@ type StatusDesktopConfig = object
|
||||||
longdesc: "Can be one of: \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\". \"INFO\" in production build, otherwise \"DEBUG\""
|
longdesc: "Can be one of: \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\". \"INFO\" in production build, otherwise \"DEBUG\""
|
||||||
name: "LOG_LEVEL"
|
name: "LOG_LEVEL"
|
||||||
abbr: "log-level" .}: string
|
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
|
# On macOS the first time when a user gets the "App downloaded from the
|
||||||
|
|
|
@ -163,6 +163,7 @@ proc mainProc() =
|
||||||
singletonInstance.engine.setRootContextProperty("uiScaleFilePath", newQVariant(uiScaleFilePath))
|
singletonInstance.engine.setRootContextProperty("uiScaleFilePath", newQVariant(uiScaleFilePath))
|
||||||
singletonInstance.engine.setRootContextProperty("singleInstance", newQVariant(singleInstance))
|
singletonInstance.engine.setRootContextProperty("singleInstance", newQVariant(singleInstance))
|
||||||
singletonInstance.engine.setRootContextProperty("isExperimental", isExperimentalQVariant)
|
singletonInstance.engine.setRootContextProperty("isExperimental", isExperimentalQVariant)
|
||||||
|
singletonInstance.engine.setRootContextProperty("fleetSelectionEnabled", newQVariant(FLEET_SELECTION_ENABLED))
|
||||||
singletonInstance.engine.setRootContextProperty("signals", signalsManagerQVariant)
|
singletonInstance.engine.setRootContextProperty("signals", signalsManagerQVariant)
|
||||||
singletonInstance.engine.setRootContextProperty("production", isProductionQVariant)
|
singletonInstance.engine.setRootContextProperty("production", isProductionQVariant)
|
||||||
|
|
||||||
|
|
|
@ -318,6 +318,7 @@ StatusSectionLayout {
|
||||||
messagingStore: root.store.messagingStore
|
messagingStore: root.store.messagingStore
|
||||||
advancedStore: root.store.advancedStore
|
advancedStore: root.store.advancedStore
|
||||||
walletStore: root.store.walletStore
|
walletStore: root.store.walletStore
|
||||||
|
isFleetSelectionEnabled: fleetSelectionEnabled
|
||||||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced)
|
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.advanced)
|
||||||
contentWidth: d.contentWidth
|
contentWidth: d.contentWidth
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ SettingsContentBase {
|
||||||
property AdvancedStore advancedStore
|
property AdvancedStore advancedStore
|
||||||
property WalletStore walletStore
|
property WalletStore walletStore
|
||||||
|
|
||||||
|
property bool isFleetSelectionEnabled
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: advancedContainer
|
id: advancedContainer
|
||||||
width: root.contentWidth
|
width: root.contentWidth
|
||||||
|
@ -59,6 +61,7 @@ SettingsContentBase {
|
||||||
text: qsTr("Fleet")
|
text: qsTr("Fleet")
|
||||||
currentValue: root.advancedStore.fleet
|
currentValue: root.advancedStore.fleet
|
||||||
onClicked: fleetModal.open()
|
onClicked: fleetModal.open()
|
||||||
|
visible: root.isFleetSelectionEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusSettingsLineButton {
|
StatusSettingsLineButton {
|
||||||
|
|
Loading…
Reference in New Issue