2017-03-17 13:01:59 +03:00
|
|
|
import QtQuick 2.5
|
|
|
|
import QtQuick.Controls 1.4
|
|
|
|
|
|
|
|
Menu {
|
|
|
|
|
|
|
|
property var credential
|
|
|
|
property bool showGenerate
|
|
|
|
property bool enableGenerate
|
|
|
|
|
|
|
|
MenuItem {
|
2017-07-05 15:32:56 +03:00
|
|
|
text: qsTr("\&Copy to clipboard")
|
2017-03-17 13:01:59 +03:00
|
|
|
enabled: (credential != null) && (credential.code != null)
|
|
|
|
onTriggered: copy()
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
visible: showGenerate
|
|
|
|
enabled: enableGenerate
|
2017-03-22 16:45:33 +03:00
|
|
|
text: qsTr("Generate code")
|
2017-07-31 14:52:06 +03:00
|
|
|
onTriggered: generate(false)
|
2017-03-17 13:01:59 +03:00
|
|
|
}
|
|
|
|
|
2017-07-05 15:34:18 +03:00
|
|
|
MenuSeparator {
|
|
|
|
}
|
|
|
|
|
2017-03-17 13:01:59 +03:00
|
|
|
MenuItem {
|
2017-03-22 16:45:33 +03:00
|
|
|
text: qsTr("Delete")
|
2017-03-17 13:01:59 +03:00
|
|
|
onTriggered: deleteCredential()
|
|
|
|
}
|
|
|
|
}
|