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 if (required && pinPadLoader.item) {
46 pinPadLoader.item.clear(false);
51 // This causes the loader below to destry and recreate the source
52 pinPadLoader.resetting = true;
53 pinPadLoader.resetting = false;
58 source: root.required ? root.background : ""
67 objectName: "pinPadLoader"
71 verticalCenter: parent.verticalCenter
72 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : 0
74 property bool resetting: false
76 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
79 target: pinPadLoader.item
82 LightDM.Greeter.respond(passphrase);
91 target: pinPadLoader.item
96 target: pinPadLoader.item
97 property: "placeholderText"
98 value: root.placeholderText
101 target: pinPadLoader.item
110 top: pinPadLoader.bottom
111 topMargin: units.gu(4)
113 bottom: parent.bottom
118 objectName: "emergencyCallIcon"
121 anchors.horizontalCenter: parent.horizontalCenter
122 name: "phone-app-call-symbolic"
128 onClicked: root.emergencyCall()
133 text: i18n.tr("Emergency call")
137 anchors.horizontalCenter: parent.horizontalCenter
142 target: LightDM.Greeter
144 onAuthenticationComplete: {
145 if (LightDM.Greeter.promptless) {
148 if (LightDM.Greeter.authenticated) {
151 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