mirror of
https://github.com/QRouland/UTPass.git
synced 2025-08-29 16:36:31 +00:00
Initial Commit : 0.0.1
This commit is contained in:
50
qml/dialogs/PassphraseDialog.qml
Normal file
50
qml/dialogs/PassphraseDialog.qml
Normal file
@@ -0,0 +1,50 @@
|
||||
import QtQuick 2.4
|
||||
import Ubuntu.Components 1.3
|
||||
import Ubuntu.Components.Popups 1.3
|
||||
|
||||
Dialog {
|
||||
id: passphraseProvider
|
||||
title: i18n.tr("Authentication required")
|
||||
text: i18n.tr("Enter passphrase:")
|
||||
|
||||
signal validated(string passphrase)
|
||||
signal canceled
|
||||
|
||||
function activateFocus() {
|
||||
passphraseField.forceActiveFocus()
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: passphraseField
|
||||
|
||||
placeholderText: i18n.tr("passphrase")
|
||||
echoMode: TextInput.Password
|
||||
|
||||
onAccepted: okButton.clicked(text)
|
||||
}
|
||||
|
||||
Button {
|
||||
id: okButton
|
||||
|
||||
text: i18n.tr("Ok")
|
||||
color: UbuntuColors.green
|
||||
|
||||
onClicked: {
|
||||
validated(passphraseField.text)
|
||||
passphraseField.text = ""
|
||||
PopupUtils.close(passphraseProvider)
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: cancelButton
|
||||
text: i18n.tr("Cancel")
|
||||
|
||||
color: UbuntuColors.red
|
||||
|
||||
onClicked: {
|
||||
canceled()
|
||||
PopupUtils.close(passphraseProvider)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user