chore(CommunityProfile): comment notifications and remove Delete code

Fixes #2272
This commit is contained in:
Jonathan Rainville 2021-04-20 13:30:16 -04:00 committed by Iuri Matias
parent 86e69132c6
commit b433b23245
1 changed files with 23 additions and 37 deletions

View File

@ -158,28 +158,29 @@ Item {
// }
// }
CommunityPopupButton {
id: notificationsBtn
//% "Notifications"
label: qsTrId("notifications")
iconName: "notifications"
width: parent.width
txtColor: Style.current.textColor
type: globalSettings.theme === Universal.Dark ? "secondary" : "primary"
onClicked: function(){
notificationSwitch.checked = !notificationSwitch.checked
}
StatusSwitch {
id: notificationSwitch
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
anchors.verticalCenter: parent.verticalCenter
onCheckedChanged: function(value) {
// TODO: enable/disable notifications
console.log("TODO: toggle")
}
}
}
// TODO re-add when this is supported
// CommunityPopupButton {
// id: notificationsBtn
// //% "Notifications"
// label: qsTrId("notifications")
// iconName: "notifications"
// width: parent.width
// txtColor: Style.current.textColor
// type: globalSettings.theme === Universal.Dark ? "secondary" : "primary"
// onClicked: function(){
// notificationSwitch.checked = !notificationSwitch.checked
// }
// StatusSwitch {
// id: notificationSwitch
// anchors.right: parent.right
// anchors.rightMargin: Style.current.padding
// anchors.verticalCenter: parent.verticalCenter
// onCheckedChanged: function(value) {
// // TODO: enable/disable notifications
// console.log("TODO: toggle")
// }
// }
// }
Item {
id: spacer1
@ -237,20 +238,5 @@ Item {
iconName: "leave"
type: globalSettings.theme === Universal.Dark ? "secondary" : "primary"
}
Loader {
// TODO(pascal): reactivate with `isAdmin` once delete functionality
// is actually implemented
active: false
width: parent.width
sourceComponent: CommunityPopupButton {
id: deleteBtn
//% "Delete"
label: qsTrId("delete")
iconName: "delete"
txtColor: Style.current.danger
type: "warn"
}
}
}
}