fix(@desktop/chat): Remove notifications section from community management

This commit is contained in:
Michał Cieślak 2022-07-18 14:50:08 +02:00 committed by Michał
parent 1983443608
commit 3e6220dc90
2 changed files with 16 additions and 50 deletions

View File

@ -23,14 +23,15 @@ StatusAppTwoPanelLayout {
id: root id: root
// TODO: get this model from backend? // TODO: get this model from backend?
property var settingsMenuModel: [{name: qsTr("Overview"), icon: "help"}, property var settingsMenuModel: [
{name: qsTr("Overview"), icon: "help"},
{name: qsTr("Members"), icon: "group-chat"}, {name: qsTr("Members"), icon: "group-chat"},
// {name: qsTr("Permissions"), icon: "objects"}, // {name: qsTr("Permissions"), icon: "objects"},
// {name: qsTr("Tokens"), icon: "token"}, // {name: qsTr("Tokens"), icon: "token"},
// {name: qsTr("Airdrops"), icon: "airdrop"}, // {name: qsTr("Airdrops"), icon: "airdrop"},
// {name: qsTr("Token sales"), icon: "token-sale"}, // {name: qsTr("Token sales"), icon: "token-sale"},
// {name: qsTr("Subscriptions"), icon: "subscription"}, // {name: qsTr("Subscriptions"), icon: "subscription"}
{name: qsTr("Notifications"), icon: "notification"}] ]
property var rootStore property var rootStore
property var community property var community
@ -78,7 +79,7 @@ StatusAppTwoPanelLayout {
width: listView.width width: listView.width
title: modelData.name title: modelData.name
icon.name: modelData.icon icon.name: modelData.icon
selected: d.currentIndex == index selected: d.currentIndex === index
onClicked: d.currentIndex = index onClicked: d.currentIndex = index
} }
} }
@ -192,30 +193,6 @@ StatusAppTwoPanelLayout {
communitySectionModule: root.chatCommunitySectionModule communitySectionModule: root.chatCommunitySectionModule
}) })
} }
SettingsPageLayout {
title: qsTr("Notifications")
content: ColumnLayout {
StatusListItem {
Layout.fillWidth: true
title: qsTr("Enabled")
icon.name: "notification"
sensor.cursorShape: Qt.ArrowCursor
components: [
StatusSwitch {
checked: !root.community.muted
onClicked: root.chatCommunitySectionModule.setCommunityMuted(!checked)
}
]
}
Item {
Layout.fillHeight: true
}
}
}
} }
} }

View File

@ -2549,43 +2549,32 @@ Do you wish to override the security check and continue?</translation>
<context> <context>
<name>CommunitySettingsView</name> <name>CommunitySettingsView</name>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="26" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="27" />
<source>Overview</source> <source>Overview</source>
<translation>Overview</translation> <translation>Overview</translation>
</message> </message>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="27" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="28" />
<source>Members</source> <source>Members</source>
<translation>Members</translation> <translation>Members</translation>
</message> </message>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="33" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="68" />
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="197" />
<source>Notifications</source>
<translation>Notifications</translation>
</message>
<message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="67" />
<source>Settings</source> <source>Settings</source>
<translation>Settings</translation> <translation>Settings</translation>
</message> </message>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="93" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="94" />
<source>Open legacy popup (to be removed)</source> <source>Open legacy popup (to be removed)</source>
<translation>Open legacy popup (to be removed)</translation> <translation>Open legacy popup (to be removed)</translation>
</message> </message>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="107" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="108" />
<source>Back to community</source> <source>Back to community</source>
<translation>Back to community</translation> <translation>Back to community</translation>
</message> </message>
<message> <message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="203" /> <location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="207" />
<source>Enabled</source>
<translation>Enabled</translation>
</message>
<message>
<location filename="../app/AppLayouts/Chat/views/CommunitySettingsView.qml" line="230" />
<source>Error editing the community</source> <source>Error editing the community</source>
<translation>Error editing the community</translation> <translation>Error editing the community</translation>
</message> </message>