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 { // TODO re-add when this is supported
id: notificationsBtn // CommunityPopupButton {
//% "Notifications" // id: notificationsBtn
label: qsTrId("notifications") // //% "Notifications"
iconName: "notifications" // label: qsTrId("notifications")
width: parent.width // iconName: "notifications"
txtColor: Style.current.textColor // width: parent.width
type: globalSettings.theme === Universal.Dark ? "secondary" : "primary" // txtColor: Style.current.textColor
onClicked: function(){ // type: globalSettings.theme === Universal.Dark ? "secondary" : "primary"
notificationSwitch.checked = !notificationSwitch.checked // onClicked: function(){
} // notificationSwitch.checked = !notificationSwitch.checked
StatusSwitch { // }
id: notificationSwitch // StatusSwitch {
anchors.right: parent.right // id: notificationSwitch
anchors.rightMargin: Style.current.padding // anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter // anchors.rightMargin: Style.current.padding
onCheckedChanged: function(value) { // anchors.verticalCenter: parent.verticalCenter
// TODO: enable/disable notifications // onCheckedChanged: function(value) {
console.log("TODO: toggle") // // TODO: enable/disable notifications
} // console.log("TODO: toggle")
} // }
} // }
// }
Item { Item {
id: spacer1 id: spacer1
@ -237,20 +238,5 @@ Item {
iconName: "leave" iconName: "leave"
type: globalSettings.theme === Universal.Dark ? "secondary" : "primary" 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"
}
}
} }
} }