lock works
This commit is contained in:
@@ -45,7 +45,7 @@ ColumnLayout {
|
||||
property Item midFO: midFO
|
||||
|
||||
|
||||
VFlyout {
|
||||
VFlyoutDown {
|
||||
id: midFO
|
||||
|
||||
radius: root.radius
|
||||
|
||||
@@ -24,7 +24,7 @@ Item {
|
||||
property int selected: 0
|
||||
|
||||
|
||||
VFlyout {
|
||||
VFlyoutDown {
|
||||
|
||||
visible: root.visible
|
||||
|
||||
|
||||
@@ -15,14 +15,23 @@ Item {
|
||||
|
||||
property bool locked: false
|
||||
|
||||
onLockedChanged: lock.locked = locked
|
||||
|
||||
required property string bg_path
|
||||
|
||||
required property LockCtx ctx
|
||||
property color fieldColor: ctx.failed ? "red" : Pywal.colors.color1
|
||||
|
||||
IpcHandler {
|
||||
target: "lockscreen"
|
||||
|
||||
function lock() { lock.locked = true; }
|
||||
function unlock() { lock.locked = false; }
|
||||
}
|
||||
|
||||
LockCtx {
|
||||
id: ctx
|
||||
|
||||
lock: root.lock
|
||||
onShouldUnlock: lock.locked = false
|
||||
}
|
||||
|
||||
WlSessionLock {
|
||||
@@ -31,6 +40,10 @@ Item {
|
||||
|
||||
locked: root.locked
|
||||
|
||||
onLockedChanged: {
|
||||
root.locked = locked
|
||||
}
|
||||
|
||||
|
||||
WlSessionLockSurface {
|
||||
color: "transparent"
|
||||
@@ -49,7 +62,7 @@ Item {
|
||||
|
||||
RowLayout {
|
||||
ClippingWrapperRectangle {
|
||||
color: Pywal.colors.color1
|
||||
color: root.fieldColor
|
||||
implicitWidth: 200
|
||||
TextInput {
|
||||
text: ""
|
||||
@@ -69,7 +82,7 @@ Item {
|
||||
Button {
|
||||
text: "unlock"
|
||||
onClicked: {
|
||||
ctx.unlock()
|
||||
ctx.doUnlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,17 +19,15 @@ Scope {
|
||||
|
||||
property bool failed: false
|
||||
|
||||
required property WlSessionLock lock
|
||||
signal shouldUnlock()
|
||||
|
||||
onPassChanged: failed = false
|
||||
|
||||
function unlock() {
|
||||
function doUnlock() {
|
||||
if(pass == "") return;
|
||||
|
||||
if(!busy) {
|
||||
root.busy = true
|
||||
pam.start()
|
||||
} else return;
|
||||
}
|
||||
|
||||
PamContext {
|
||||
@@ -44,10 +42,13 @@ Scope {
|
||||
|
||||
onCompleted: result => {
|
||||
if (result == PamResult.Success) {
|
||||
lock.locked = false
|
||||
root.shouldUnlock()
|
||||
console.log("auth Success")
|
||||
root.pass = "";
|
||||
} else {
|
||||
root.pass = "";
|
||||
root.failed = true;
|
||||
abort()
|
||||
}
|
||||
|
||||
root.busy = false;
|
||||
|
||||
85
config/aurora/modules/VFlyoutLeft.qml
Normal file
85
config/aurora/modules/VFlyoutLeft.qml
Normal file
@@ -0,0 +1,85 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
required property real radius
|
||||
property real pad: 5
|
||||
property color color
|
||||
|
||||
property Item item
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
item.y = pad
|
||||
}
|
||||
|
||||
width: shape.width
|
||||
height: shape.height
|
||||
|
||||
Shape {
|
||||
id: shape
|
||||
|
||||
//anchors.centerIn: parent
|
||||
ShapePath {
|
||||
id: path
|
||||
|
||||
strokeWidth: 4
|
||||
strokeColor: root.color
|
||||
fillColor: root.color
|
||||
|
||||
startX: -root.radius - pad; startY: 0
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { x: -root.radius - pad; y: 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
85
config/aurora/modules/VFlyoutRight.qml
Normal file
85
config/aurora/modules/VFlyoutRight.qml
Normal file
@@ -0,0 +1,85 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
required property real radius
|
||||
property real pad: 5
|
||||
property color color
|
||||
|
||||
property Item item
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
item.y = pad
|
||||
}
|
||||
|
||||
width: shape.width
|
||||
height: shape.height
|
||||
|
||||
Shape {
|
||||
id: shape
|
||||
|
||||
//anchors.centerIn: parent
|
||||
ShapePath {
|
||||
id: path
|
||||
|
||||
strokeWidth: 4
|
||||
strokeColor: root.color
|
||||
fillColor: root.color
|
||||
|
||||
startX: -root.radius - pad; startY: 0
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { x: -root.radius - pad; y: 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
85
config/aurora/modules/VFlyoutUp.qml
Normal file
85
config/aurora/modules/VFlyoutUp.qml
Normal file
@@ -0,0 +1,85 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
required property real radius
|
||||
property real pad: 5
|
||||
property color color
|
||||
|
||||
property Item item
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
item.y = pad
|
||||
}
|
||||
|
||||
width: shape.width
|
||||
height: shape.height
|
||||
|
||||
Shape {
|
||||
id: shape
|
||||
|
||||
//anchors.centerIn: parent
|
||||
ShapePath {
|
||||
id: path
|
||||
|
||||
strokeWidth: 4
|
||||
strokeColor: root.color
|
||||
fillColor: root.color
|
||||
|
||||
startX: -root.radius - pad; startY: 0
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
||||
|
||||
PathArc {
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { x: -root.radius - pad; y: 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
0
config/aurora/modules/Wallpaper.qml
Normal file
0
config/aurora/modules/Wallpaper.qml
Normal file
Reference in New Issue
Block a user