Skip to content

Commit

Permalink
ListItem should show toast for insufficient writeAccess level
Browse files Browse the repository at this point in the history
Part of #1766
  • Loading branch information
MikeTrahearn-Qinetic committed Jan 24, 2025
1 parent f2395be commit 4925ae8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/listitems/core/ListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ Item {
radius: backgroundRect.radius
onClicked: {
if(Global.systemSettings?.accessMode === VenusOS.User_AccessType_ReadWrite) {
root.clicked()
if(!root.userHasWriteAccess) {
//% "Setting \"%1\" is locked for access level"
Global.notificationLayer.showToastNotification(VenusOS.Notification_Info, qsTrId("listItem_no_access").arg(root.text))
} else {
root.clicked()
}
} else {
Global.dialogLayer.open(readOnlyAccessWarningDialog)
}
Expand Down

0 comments on commit 4925ae8

Please sign in to comment.