1402 1402 readonly property var request: panelState.request
|| ({})
1403 - readonly property
var panel: panelState.privilegeSurfacePanelContract
|| ({})
1404 - readonly property string source:
"Quickshell Polkit manual agent.qml plus Nuguland Polkit.qml plus Nuguland PolkitService.qml" 1405 - readonly property bool isolatedSecuritySurface:
true 1406 - readonly property bool requestIdentityCard:
true 1407 1403 readonly property bool secretPromptField:
true 1408 1404 readonly property bool denyCancelConfirmRow:
true 1409 1405 readonly property bool failureShakeSlot:
true 1410 - readonly property bool noDecorativeDistraction:
true 1411 - readonly property bool serviceFedOnly:
true 1413 1407 function parseJson(text, valueWhenInvalid) {
1421 1415 function refreshFrom(text) {
1422 - state
= parseJson(text, state);
1416 + panelState
= parseJson(text, panelState);
1425 1419 function submitSecret(secret) {
1437 1431 refreshFrom(privilegeService.cancel());
1434 + function focusSecret() {
1435 + if (root.visible
&& root.panelState.active) {
1436 + root.forceActiveFocus();
1437 + secretInput.forceActiveFocus();
1440 1441 color: theme
? theme.withAlpha(theme.ui.backdrop,
0.94)
: "black" 1441 1442 visible: panelState.active
|| panelState.error.length
> 0 1444 + onVisibleChanged:
Qt.callLater(root.focusSecret)
1445 + Component.onCompleted:
Qt.callLater(root.focusSecret)
1442 1446 Keys.onEscapePressed: event =
> {
1443 1447 event.accepted
= true;
1448 1452 anchors.centerIn: parent
1449 - width:
Math.
min(parent.width
- 48,
520)
1453 + width:
Math.
min(parent.width
- 48,
680)
1450 1454 height: cardColumn.implicitHeight
+ 44 1452 1456 color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.98)
: "#181818" 1462 1466 anchors.margins:
22 1466 1470 width: parent.width
1476 + text: root.panelState.error
? "authentication unavailable" : "authorization required" 1477 + width: parent.width
1478 + elide:
Text.ElideRight
1473 - color: root.theme
? root.theme.withAlpha(root.panelState.error
? root.theme.error
: root.theme.ui.accent,
0.18)
: "transparent" 1482 + width: parent.width
1483 + height: commandText.implicitHeight
+ 20 1485 + color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.08)
: "transparent" 1476 - anchors.centerIn: parent
1477 - text: root.panelState.error
? "!" : "◆" 1478 - color: root.theme
? (root.panelState.error
? root.theme.error
: root.theme.ui.accent)
: "white" 1479 - font.family:
"IBM Plex Mono" 1480 - font.pixelSize:
18 1486 - width: parent.width
- 50 1492 - text: root.panelState.error
? "authentication unavailable" : "authorization required" 1493 - width: parent.width
1494 - elide:
Text.ElideRight
1490 + anchors.left: parent.left
1491 + anchors.right: parent.right
1492 + anchors.top: parent.top
1493 + anchors.margins:
10 1500 1494 text: root.request.message
|| "A system change needs your password." 1501 - width: parent.width
1502 - wrapMode:
Text.WordWrap
1503 - color: root.theme
? root.theme.ui.minor
: "white" 1509 - objectName:
"requestIdentityCard" 1510 - width: parent.width
1511 - height: identityColumn.implicitHeight
+ 18 1513 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.07)
: "transparent" 1516 - id: identityColumn
1518 - anchors.left: parent.left
1519 - anchors.right: parent.right
1520 - anchors.top: parent.top
1521 - anchors.margins:
10 1527 - text: root.request.app
|| "system policy" 1528 - width: parent.width
1529 1495 color: root.theme
? root.theme.content.normal
: "white" 1530 - elide:
Text.ElideRight
1534 - visible: (root.request.actionId
|| "").length
> 0 1537 - text: root.request.actionId
|| "" 1538 - width: parent.width
1539 - color: root.theme
? root.theme.ui.minor
: "white" 1540 - elide:
Text.ElideMiddle
1496 + font.family:
"IBM Plex Sans" 1497 + font.pixelSize:
14 1498 + wrapMode:
Text.WordWrap
1499 + elide:
Text.ElideNone
1561 1520 width: parent.width
1564 - color: root.theme
? root.theme.withAlpha(root.theme.ui.focus,
0.1)
: "transparent" 1523 + color: root.theme
? root.theme.withAlpha(root.theme.ui.focus, secretInput.activeFocus
? 0.16 : 0.1)
: "transparent" 1565 1524 border.width:
1 1566 - border.color: root.theme
? root.theme.withAlpha(root.panelState.error
? root.theme.error
: root.theme.ui.focus, root.panelState.error
? 0.45 : 0.22)
: "transparent" 1525 + border.color: root.theme
? root.theme.withAlpha(root.panelState.error
? root.theme.error
: root.theme.ui.focus, root.panelState.error
? 0.55 : (secretInput.activeFocus
? 0.82 : 0.32))
: "transparent" 1569 1528 anchors.left: parent.left
1572 1531 theme: root.theme
1573 1532 variant:
"meta" 1574 1533 text: root.request.prompt
|| "password" 1534 + visible: secretInput.text.length
=== 0 1535 + opacity: secretInput.activeFocus
? 0.42 : 0.68 1539 + anchors.fill: parent
1540 + cursorShape:
Qt.IBeamCursor
1541 + onClicked: secretInput.forceActiveFocus()
1579 1545 id: secretInput
1581 - anchors.left: parent.left
1582 - anchors.leftMargin:
104 1583 - anchors.right: parent.right
1547 + anchors.fill: parent
1548 + anchors.leftMargin:
14 1584 1549 anchors.rightMargin:
14 1585 - anchors.verticalCenter: parent.verticalCenter
1550 + verticalAlignment:
TextInput.AlignVCenter
1586 1551 color: root.theme
? root.theme.content.normal
: "white" 1587 1552 selectionColor: root.theme
? root.theme.ui.focus
: "white" 1588 1553 selectedTextColor: root.theme
? root.theme.content.backdrop
: "black" 1590 1555 echoMode: root.request.responseVisible
? TextInput.Normal
: TextInput.Password
1591 1556 inputMethodHints:
Qt.ImhSensitiveData
1592 1557 focus: root.panelState.active
1593 - onActiveFocusChanged: {
1594 - if (
!activeFocus
&& root.panelState.active)
1595 - forceActiveFocus();
1558 + activeFocusOnTab:
true 1559 + onActiveFocusChanged:
if (
!activeFocus
&& root.panelState.active)
1560 + Qt.callLater(root.focusSecret)
1597 1561 Keys.onReturnPressed: event =
> {
1598 1562 event.accepted
= true;
1599 1563 root.
submitSecret(text);
1663 1627 anchors.centerIn: parent
1664 1628 theme: root.theme
1665 1629 variant:
"meta" 1667 1630 text:
"authorize" 1668 - color: root.theme
? (parent.enabled
? root.theme.ui.accent
: root.theme.ui.normal)
: "white" 1631 + color: root.theme
? (parent.enabled
? root.theme.content.normal
: root.theme.ui.normal)
: "white"