1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

bluetooth: expose trust/untrust on devices

This commit is contained in:
bbedward
2026-02-22 22:10:07 -05:00
parent 71aad8ee32
commit bc4ad31d48
2 changed files with 28 additions and 0 deletions

View File

@@ -669,6 +669,30 @@ Rectangle {
}
}
MenuItem {
text: bluetoothContextMenu.currentDevice?.trusted ? I18n.tr("Untrust") : I18n.tr("Trust")
height: 32
contentItem: StyledText {
text: parent.text
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
leftPadding: Theme.spacingS
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
color: parent.hovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent"
radius: Theme.cornerRadius / 2
}
onTriggered: {
if (!bluetoothContextMenu.hasDevice)
return;
bluetoothContextMenu.currentDevice.trusted = !bluetoothContextMenu.currentDevice.trusted;
}
}
MenuItem {
text: I18n.tr("Forget Device")
height: 32