working polkit update + 1
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
|
||||
BusyIndicator {
|
||||
id: control
|
||||
property color color: delegate.color
|
||||
property int busySize: 64
|
||||
|
||||
contentItem: Item {
|
||||
implicitWidth: control.busySize
|
||||
implicitHeight: control.busySize
|
||||
|
||||
Item {
|
||||
id: item
|
||||
x: parent.width / 2 - (control.busySize / 2)
|
||||
y: parent.height / 2 - (control.busySize / 2)
|
||||
width: control.busySize
|
||||
height: control.busySize
|
||||
opacity: control.running ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: 250
|
||||
}
|
||||
}
|
||||
|
||||
RotationAnimator {
|
||||
target: item
|
||||
running: control.visible && control.running
|
||||
from: 0
|
||||
to: 360
|
||||
loops: Animation.Infinite
|
||||
duration: 1250
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: 6
|
||||
|
||||
CustomRect {
|
||||
id: delegate
|
||||
x: item.width / 2 - width / 2
|
||||
y: item.height / 2 - height / 2
|
||||
implicitWidth: 10
|
||||
implicitHeight: 10
|
||||
radius: 5
|
||||
color: control.color
|
||||
|
||||
required property int index
|
||||
|
||||
transform: [
|
||||
Translate {
|
||||
y: -Math.min(item.width, item.height) * 0.5 + 5
|
||||
},
|
||||
Rotation {
|
||||
angle: delegate.index / repeater.count * 360
|
||||
origin.x: 5
|
||||
origin.y: 5
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-15
@@ -90,7 +90,7 @@ Scope {
|
||||
spacing: 24
|
||||
|
||||
IconImage {
|
||||
source: Quickshell.iconPath(polkitAgent.flow?.iconName) ?? ""
|
||||
source: Quickshell.iconPath(polkitAgent.flow?.iconName, true) ?? ""
|
||||
implicitSize: 64
|
||||
mipmap: true
|
||||
|
||||
@@ -130,16 +130,19 @@ Scope {
|
||||
id: passInput
|
||||
|
||||
echoMode: polkitAgent.flow?.responseVisible ? TextInput.Normal : TextInput.Password
|
||||
placeholderText: polkitAgent.flow?.failed ? " Incorrect Password" : " Input Password"
|
||||
selectByMouse: true
|
||||
onAccepted: okButton.clicked()
|
||||
|
||||
placeholderTextColor: polkitAgent.flow?.failed ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onSurfaceVariant
|
||||
|
||||
Layout.preferredWidth: contentColumn.implicitWidth
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
background: CustomRect {
|
||||
radius: 8
|
||||
implicitHeight: 40
|
||||
color: passInput.enabled ? DynamicColors.tPalette.m3surfaceVariant : DynamicColors.tPalette.m3onSurfaceVariant
|
||||
color: ( polkitAgent.flow?.failed && passInput.text === "" ) ? DynamicColors.palette.m3error : DynamicColors.tPalette.m3surfaceVariant
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,24 +204,17 @@ Scope {
|
||||
ColumnLayout {
|
||||
id: textDetailsColumn
|
||||
spacing: 8
|
||||
anchors.centerIn: parent
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
opacity: 0
|
||||
scale: 0.9
|
||||
|
||||
CustomText {
|
||||
Layout.preferredWidth: 650
|
||||
text: `cookie: ${polkitAgent.flow?.cookie}`
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.preferredWidth: 650
|
||||
text: `actionId: ${polkitAgent.flow?.actionId}`
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.preferredWidth: 650
|
||||
text: `selectedIdentity: ${polkitAgent.flow?.selectedIdentity}`
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
@@ -264,7 +260,6 @@ Scope {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
onClicked: {
|
||||
polkitAgent.flow.submit(passInput.text)
|
||||
root.shouldShow = false
|
||||
passInput.text = ""
|
||||
passInput.forceActiveFocus()
|
||||
}
|
||||
@@ -295,12 +290,15 @@ Scope {
|
||||
|
||||
function onIsResponseRequiredChanged() {
|
||||
passInput.text = ""
|
||||
if ( polkitAgent.flow?.isResponseRequired ) {
|
||||
if ( polkitAgent.flow?.isResponseRequired )
|
||||
root.shouldShow = true
|
||||
passInput.forceActiveFocus()
|
||||
} else {
|
||||
}
|
||||
|
||||
function onIsSuccessfulChanged() {
|
||||
if ( polkitAgent.flow?.isSuccessful )
|
||||
root.shouldShow = false
|
||||
}
|
||||
passInput.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user