lock works
This commit is contained in:
@@ -45,7 +45,7 @@ ColumnLayout {
|
|||||||
property Item midFO: midFO
|
property Item midFO: midFO
|
||||||
|
|
||||||
|
|
||||||
VFlyout {
|
VFlyoutDown {
|
||||||
id: midFO
|
id: midFO
|
||||||
|
|
||||||
radius: root.radius
|
radius: root.radius
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Item {
|
|||||||
property int selected: 0
|
property int selected: 0
|
||||||
|
|
||||||
|
|
||||||
VFlyout {
|
VFlyoutDown {
|
||||||
|
|
||||||
visible: root.visible
|
visible: root.visible
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,23 @@ Item {
|
|||||||
|
|
||||||
property bool locked: false
|
property bool locked: false
|
||||||
|
|
||||||
|
onLockedChanged: lock.locked = locked
|
||||||
|
|
||||||
required property string bg_path
|
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 {
|
LockCtx {
|
||||||
id: ctx
|
id: ctx
|
||||||
|
|
||||||
lock: root.lock
|
onShouldUnlock: lock.locked = false
|
||||||
}
|
}
|
||||||
|
|
||||||
WlSessionLock {
|
WlSessionLock {
|
||||||
@@ -31,6 +40,10 @@ Item {
|
|||||||
|
|
||||||
locked: root.locked
|
locked: root.locked
|
||||||
|
|
||||||
|
onLockedChanged: {
|
||||||
|
root.locked = locked
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WlSessionLockSurface {
|
WlSessionLockSurface {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -49,7 +62,7 @@ Item {
|
|||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
color: Pywal.colors.color1
|
color: root.fieldColor
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
TextInput {
|
TextInput {
|
||||||
text: ""
|
text: ""
|
||||||
@@ -69,7 +82,7 @@ Item {
|
|||||||
Button {
|
Button {
|
||||||
text: "unlock"
|
text: "unlock"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
ctx.unlock()
|
ctx.doUnlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,18 +18,16 @@ Scope {
|
|||||||
property bool busy: false
|
property bool busy: false
|
||||||
|
|
||||||
property bool failed: false
|
property bool failed: false
|
||||||
|
|
||||||
required property WlSessionLock lock
|
signal shouldUnlock()
|
||||||
|
|
||||||
onPassChanged: failed = false
|
onPassChanged: failed = false
|
||||||
|
|
||||||
function unlock() {
|
function doUnlock() {
|
||||||
if(pass == "") return;
|
if(pass == "") return;
|
||||||
|
|
||||||
if(!busy) {
|
root.busy = true
|
||||||
root.busy = true
|
pam.start()
|
||||||
pam.start()
|
|
||||||
} else return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PamContext {
|
PamContext {
|
||||||
@@ -44,10 +42,13 @@ Scope {
|
|||||||
|
|
||||||
onCompleted: result => {
|
onCompleted: result => {
|
||||||
if (result == PamResult.Success) {
|
if (result == PamResult.Success) {
|
||||||
lock.locked = false
|
root.shouldUnlock()
|
||||||
|
console.log("auth Success")
|
||||||
|
root.pass = "";
|
||||||
} else {
|
} else {
|
||||||
root.pass = "";
|
root.pass = "";
|
||||||
root.failed = true;
|
root.failed = true;
|
||||||
|
abort()
|
||||||
}
|
}
|
||||||
|
|
||||||
root.busy = false;
|
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