feat(Advanced): Add toggle to enable managing community on testnet
Fixes #12276
This commit is contained in:
parent
e36ace38b2
commit
f5b767ec15
|
@ -27,6 +27,7 @@ QtObject {
|
|||
root.fleet === Constants.status_prod
|
||||
|
||||
readonly property bool isFakeLoadingScreenEnabled: localAppSettings.fakeLoadingScreenEnabled ?? false
|
||||
property bool isManageCommunityOnTestModeEnabled: false
|
||||
readonly property QtObject experimentalFeatures: QtObject {
|
||||
readonly property string browser: "browser"
|
||||
readonly property string communities: "communities"
|
||||
|
@ -155,6 +156,10 @@ QtObject {
|
|||
localAppSettings.fakeLoadingScreenEnabled = !localAppSettings.fakeLoadingScreenEnabled
|
||||
}
|
||||
|
||||
function toggleManageCommunityOnTestnet() {
|
||||
root.isManageCommunityOnTestModeEnabled = !root.isManageCommunityOnTestModeEnabled
|
||||
}
|
||||
|
||||
function toggleWakuV2ShardedCommunities() {
|
||||
if(!localAppSettings)
|
||||
return
|
||||
|
|
|
@ -445,6 +445,17 @@ SettingsContentBase {
|
|||
}
|
||||
}
|
||||
|
||||
StatusSettingsLineButton {
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
text: qsTr("Manage communities on testnet")
|
||||
isSwitch: true
|
||||
switchChecked: root.advancedStore.isManageCommunityOnTestModeEnabled
|
||||
onClicked: {
|
||||
root.advancedStore.toggleManageCommunityOnTestnet()
|
||||
}
|
||||
}
|
||||
|
||||
StatusSettingsLineButton {
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
|
|
|
@ -1266,6 +1266,8 @@ Item {
|
|||
sourceComponent: ChatLayout {
|
||||
id: chatLayoutComponent
|
||||
|
||||
readonly property bool isManageCommunityEnabledInAdvanced: appMain.rootStore.profileSectionStore.advancedStore.isManageCommunityOnTestModeEnabled
|
||||
|
||||
Binding {
|
||||
target: rootDropAreaPanel
|
||||
property: "enabled"
|
||||
|
@ -1289,8 +1291,8 @@ Item {
|
|||
sectionItemModel: model
|
||||
createChatPropertiesStore: appMain.createChatPropertiesStore
|
||||
communitiesStore: appMain.communitiesStore
|
||||
communitySettingsDisabled: production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled
|
||||
|
||||
communitySettingsDisabled: !chatLayoutComponent.isManageCommunityEnabledInAdvanced &&
|
||||
(production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled)
|
||||
rootStore: ChatStores.RootStore {
|
||||
contactsStore: appMain.rootStore.contactStore
|
||||
communityTokensStore: appMain.communityTokensStore
|
||||
|
|
Loading…
Reference in New Issue