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
|
root.fleet === Constants.status_prod
|
||||||
|
|
||||||
readonly property bool isFakeLoadingScreenEnabled: localAppSettings.fakeLoadingScreenEnabled ?? false
|
readonly property bool isFakeLoadingScreenEnabled: localAppSettings.fakeLoadingScreenEnabled ?? false
|
||||||
|
property bool isManageCommunityOnTestModeEnabled: false
|
||||||
readonly property QtObject experimentalFeatures: QtObject {
|
readonly property QtObject experimentalFeatures: QtObject {
|
||||||
readonly property string browser: "browser"
|
readonly property string browser: "browser"
|
||||||
readonly property string communities: "communities"
|
readonly property string communities: "communities"
|
||||||
|
@ -155,6 +156,10 @@ QtObject {
|
||||||
localAppSettings.fakeLoadingScreenEnabled = !localAppSettings.fakeLoadingScreenEnabled
|
localAppSettings.fakeLoadingScreenEnabled = !localAppSettings.fakeLoadingScreenEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleManageCommunityOnTestnet() {
|
||||||
|
root.isManageCommunityOnTestModeEnabled = !root.isManageCommunityOnTestModeEnabled
|
||||||
|
}
|
||||||
|
|
||||||
function toggleWakuV2ShardedCommunities() {
|
function toggleWakuV2ShardedCommunities() {
|
||||||
if(!localAppSettings)
|
if(!localAppSettings)
|
||||||
return
|
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 {
|
StatusSettingsLineButton {
|
||||||
anchors.leftMargin: 0
|
anchors.leftMargin: 0
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
|
|
|
@ -1266,6 +1266,8 @@ Item {
|
||||||
sourceComponent: ChatLayout {
|
sourceComponent: ChatLayout {
|
||||||
id: chatLayoutComponent
|
id: chatLayoutComponent
|
||||||
|
|
||||||
|
readonly property bool isManageCommunityEnabledInAdvanced: appMain.rootStore.profileSectionStore.advancedStore.isManageCommunityOnTestModeEnabled
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
target: rootDropAreaPanel
|
target: rootDropAreaPanel
|
||||||
property: "enabled"
|
property: "enabled"
|
||||||
|
@ -1289,8 +1291,8 @@ Item {
|
||||||
sectionItemModel: model
|
sectionItemModel: model
|
||||||
createChatPropertiesStore: appMain.createChatPropertiesStore
|
createChatPropertiesStore: appMain.createChatPropertiesStore
|
||||||
communitiesStore: appMain.communitiesStore
|
communitiesStore: appMain.communitiesStore
|
||||||
communitySettingsDisabled: production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled
|
communitySettingsDisabled: !chatLayoutComponent.isManageCommunityEnabledInAdvanced &&
|
||||||
|
(production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled)
|
||||||
rootStore: ChatStores.RootStore {
|
rootStore: ChatStores.RootStore {
|
||||||
contactsStore: appMain.rootStore.contactStore
|
contactsStore: appMain.rootStore.contactStore
|
||||||
communityTokensStore: appMain.communityTokensStore
|
communityTokensStore: appMain.communityTokensStore
|
||||||
|
|
Loading…
Reference in New Issue