Merge PR #1075: Add copy to clipboard action to generic state delegates
commit
da864e7166
|
|
@ -133,6 +133,25 @@ ThingPageBase {
|
|||
swipe.right: RowLayout {
|
||||
height: delegate.height
|
||||
anchors.right: parent.right
|
||||
MouseArea {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: height
|
||||
visible: model.type === ThingModel.TypeStateType
|
||||
|
||||
ColorIcon {
|
||||
anchors.fill: parent
|
||||
anchors.margins: app.margins
|
||||
name: "../images/edit-copy.svg"
|
||||
}
|
||||
onClicked: {
|
||||
swipe.close();
|
||||
print("opening logs for", delegate.stateType.id)
|
||||
PlatformHelper.toClipBoard(root.thing.states.getState(delegate.stateType.id).value)
|
||||
ToolTip.show(qsTr("ID copied to clipboard"), 500);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: height
|
||||
|
|
|
|||
Loading…
Reference in New Issue