2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import Ubuntu.Components 0.1
23 height: highlightItem.height
25 property string placeholderText
26 property string wrongPlaceholderText
27 property string username: ""
29 signal entered(string passphrase)
32 function clear(playAnimation) {
33 pinentryField.text = "";
34 pinentryField.enabled = true
36 wrongPasswordAnimation.start();
37 pinentryField.forceActiveFocus();
39 pinentryField.focus = false
47 anchors.centerIn: parent
48 color: Qt.rgba(0.1, 0.1, 0.1, 0.4)
49 border.color: Qt.rgba(0.4, 0.4, 0.4, 0.4)
50 border.width: units.dp(1)
55 objectName: "greeterLabel"
60 margins: units.gu(1.5)
62 text: root.username.length > 0 ? i18n.tr("Hello %1").arg(root.username) : i18n.tr("Hello")
68 objectName: "pinentryField"
70 horizontalCenter: parent.horizontalCenter
75 width: parent.width - units.gu(2)
76 echoMode: TextInput.Password
79 placeholderText: wrongPasswordAnimation.running ? root.wrongPlaceholderText : root.placeholderText
82 if (pinentryField.text) {
83 pinentryField.enabled = false;
84 root.entered(pinentryField.text);
90 WrongPasswordAnimation {
91 id: wrongPasswordAnimation
92 objectName: "wrongPasswordAnimation"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list