diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml index 66c17e54a..9ccd992f1 100644 --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -24,6 +24,7 @@ PlasmaCore.ColorScope { // If we're using software rendering, draw outlines instead of shadows // See https://bugs.kde.org/show_bug.cgi?id=398317 readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software + property bool hadPrompt: false; colorGroup: PlasmaCore.Theme.ComplementaryColorGroup @@ -40,7 +41,13 @@ PlasmaCore.ColorScope { } function onSucceeded() { - Qt.quit(); + if (lockScreenUi.hadPrompt) { + Qt.quit(); + } else { + mainStack.push(Qt.resolvedUrl("NoPasswordUnlock.qml"), + {"userListModel": users}); + mainStack.forceActiveFocus(); + } } function onInfoMessage(msg) { @@ -58,12 +65,14 @@ PlasmaCore.ColorScope { } function onPrompt(msg) { + lockScreenUi.hadPrompt = true; root.notification = msg; mainBlock.echoMode = TextInput.Normal mainBlock.mainPasswordBox.text = ""; mainBlock.mainPasswordBox.forceActiveFocus(); } function onPromptForSecret(msg) { + lockScreenUi.hadPrompt = true; mainBlock.echoMode = TextInput.Password mainBlock.mainPasswordBox.text = ""; mainBlock.mainPasswordBox.forceActiveFocus(); diff --git a/lookandfeel/contents/lockscreen/NoPasswordUnlock.qml b/lookandfeel/contents/lockscreen/NoPasswordUnlock.qml new file mode 100644 index 000000000..ede3a0e20 --- /dev/null +++ b/lookandfeel/contents/lockscreen/NoPasswordUnlock.qml @@ -0,0 +1,23 @@ +/* + SPDX-FileCopyrightText: 2022 David Edmundson + + SPDX-License-Identifier: GPL-2.0-or-later +*/ +import QtQuick 2.2 + +import org.kde.plasma.components 3.0 as PlasmaComponents3 + +import "../components" + +SessionManagementScreen { + focus: true + PlasmaComponents3.Button { + id: loginButton + focus: true + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Unlock") + icon.name: LayoutMirroring.enabled ? "go-previous" : "go-next" + onClicked: Qt.quit(); + Keys.onEnterPressed: clicked() + Keys.onReturnPressed: clicked() + } +}