mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
build and emit the unlock code
still needs more review from jens along with his demo video
This commit is contained in:
parent
771a486ac9
commit
536b1e164c
1 changed files with 11 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ import "../components"
|
||||||
|
|
||||||
Leaves {
|
Leaves {
|
||||||
id: lockscreen
|
id: lockscreen
|
||||||
|
signal tryUnlock(string code)
|
||||||
|
|
||||||
PlasmaCore.Svg {
|
PlasmaCore.Svg {
|
||||||
id: symbolsSvg
|
id: symbolsSvg
|
||||||
|
|
@ -60,14 +61,16 @@ Leaves {
|
||||||
id: stripe
|
id: stripe
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
|
property string code
|
||||||
|
|
||||||
function lockKeyPressed(id) {
|
function lockKeyPressed(id) {
|
||||||
hideTimer.stop();
|
hideTimer.stop();
|
||||||
console.log(id);
|
code += id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lockKeyReleased(id) {
|
function lockKeyReleased(id) {
|
||||||
hideTimer.start();
|
hideTimer.start();
|
||||||
console.log(id);
|
code += id;
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
|
|
@ -101,7 +104,12 @@ Leaves {
|
||||||
id: hideTimer
|
id: hideTimer
|
||||||
interval: 1000
|
interval: 1000
|
||||||
running: parent.opacity == 1
|
running: parent.opacity == 1
|
||||||
onTriggered: parent.opacity = 0
|
onTriggered: {
|
||||||
|
stripe.opacity = 0;
|
||||||
|
// console.log("CODE SO FAR: " + stripe.code);
|
||||||
|
lockscreen.tryUnlock(stripe.code);
|
||||||
|
stripe.code = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LockKey {
|
LockKey {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue