Show a verified icon for verified devices rather than a verify option

This commit is contained in:
James Graham
2024-04-06 14:19:38 +00:00
parent b30220eca9
commit 9b93eb44d5
2 changed files with 26 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ FormCard.AbstractFormDelegate {
required property string id
required property string timestamp
required property string displayName
required property int type
property bool editDeviceName: false
property bool showVerifyButton
@@ -98,7 +99,7 @@ FormCard.AbstractFormDelegate {
}
QQC2.ToolButton {
display: QQC2.AbstractButton.IconOnly
visible: root.showVerifyButton
visible: root.showVerifyButton && root.type !== DevicesModel.Verified
action: Kirigami.Action {
id: verifyDeviceAction
text: i18n("Verify device")
@@ -112,6 +113,21 @@ FormCard.AbstractFormDelegate {
delay: Kirigami.Units.toolTipDelay
}
}
Kirigami.Icon {
visible: root.showVerifyButton && root.type === DevicesModel.Verified
implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: Kirigami.Units.iconSizes.smallMedium
source: "security-high"
HoverHandler {
id: verifyHover
}
QQC2.ToolTip {
text: i18nc("This device is verified", "Verified")
delay: Kirigami.Units.toolTipDelay
visible: verifyHover.hovered
}
}
QQC2.ToolButton {
display: QQC2.AbstractButton.IconOnly
action: Kirigami.Action {