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
20import LightDM 0.1 as LightDM
25 // Determine if a numeric or alphanumeric pad is used.
26 property bool alphaNumeric: false
29 property string placeholderText: ""
31 // In case the Lockscreen can show a greeter message, this is the username
32 property string username: ""
34 // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
35 // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
36 property int pinLength: 4
38 property url background: ""
42 signal emergencyCall()
45 pinPadLoader.resetting = true;
46 pinPadLoader.resetting = false;
51 source: root.required ? root.background : ""
60 objectName: "pinPadLoader"
64 verticalCenter: parent.verticalCenter
65 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : 0
67 property bool resetting: false
69 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
72 target: pinPadLoader.item
75 LightDM.Greeter.respond(passphrase);
84 target: pinPadLoader.item
89 target: pinPadLoader.item
90 property: "placeholderText"
91 value: root.placeholderText
94 target: pinPadLoader.item
103 top: pinPadLoader.bottom
104 topMargin: units.gu(4)
106 bottom: parent.bottom
111 objectName: "emergencyCallIcon"
114 anchors.horizontalCenter: parent.horizontalCenter
115 name: "phone-app-call-symbolic"
121 onClicked: root.emergencyCall()
126 text: i18n.tr("Emergency call")
130 anchors.horizontalCenter: parent.horizontalCenter
135 target: LightDM.Greeter
137 onAuthenticationComplete: {
138 if (LightDM.Greeter.promptless) {
141 if (LightDM.Greeter.authenticated) {
143 pinPadLoader.item.clear(false);
145 pinPadLoader.item.clear(true);
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