mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2026-10-20 22:04:23 +00:00
Compare commits
2 commits
7f251508f0
...
c2bc8edbe2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2bc8edbe2 | ||
|
|
0d166f8ba2 |
1 changed files with 26 additions and 11 deletions
|
|
@ -29,8 +29,8 @@ Item {
|
||||||
|
|
||||||
signal switchUserClicked()
|
signal switchUserClicked()
|
||||||
|
|
||||||
property string notification
|
property list<string> notification: []
|
||||||
property string notificationIcon
|
property list<string> notificationIcon: []
|
||||||
|
|
||||||
property alias switchUserVisible: switchUser.visible
|
property alias switchUserVisible: switchUser.visible
|
||||||
property bool capsLockOn: false
|
property bool capsLockOn: false
|
||||||
|
|
@ -48,12 +48,17 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMessage(message: string, icon: string) {
|
function showMessage(message: string, icon: string) {
|
||||||
|
if(icon == "dialog-error") {
|
||||||
|
root.notificationIcon = [icon, ...root.notificationIcon];
|
||||||
|
root.notification = [message, ...root.notification];
|
||||||
|
} else {
|
||||||
|
root.notificationIcon.push(icon);
|
||||||
|
root.notification.push(message);
|
||||||
|
}
|
||||||
if(!statusPage.visible) {
|
if(!statusPage.visible) {
|
||||||
pageView.replaceCurrentItem(statusPage);
|
pageView.replaceCurrentItem(statusPage);
|
||||||
k.forceActiveFocus();
|
k.forceActiveFocus();
|
||||||
}
|
}
|
||||||
root.notification = message;
|
|
||||||
root.notificationIcon = icon;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
component CorrectedLabel: Text {
|
component CorrectedLabel: Text {
|
||||||
|
|
@ -104,10 +109,10 @@ Item {
|
||||||
showMessage(i18nd("kscreenlocker_greet", "The user name or password is incorrect."), "dialog-error");
|
showMessage(i18nd("kscreenlocker_greet", "The user name or password is incorrect."), "dialog-error");
|
||||||
}
|
}
|
||||||
function onBusyChanged() {
|
function onBusyChanged() {
|
||||||
if(!authenticator.busy) {
|
/*if(!authenticator.busy && !statusPage.visible) {
|
||||||
root.notification = "";
|
root.notification = "";
|
||||||
root.notificationIcon = "";
|
root.notificationIcon = "";
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
function onInfoMessageChanged() {
|
function onInfoMessageChanged() {
|
||||||
showMessage(authenticator.infoMessage, "dialog-information");
|
showMessage(authenticator.infoMessage, "dialog-information");
|
||||||
|
|
@ -421,7 +426,9 @@ Item {
|
||||||
id: statusPage
|
id: statusPage
|
||||||
|
|
||||||
visible: pageView.currentItem == statusPage
|
visible: pageView.currentItem == statusPage
|
||||||
onVisibleChanged: k.forceActiveFocus();
|
onVisibleChanged: {
|
||||||
|
k.forceActiveFocus();
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -430,17 +437,19 @@ Item {
|
||||||
spacing: 40
|
spacing: 40
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: statusLabel
|
||||||
|
Layout.fillWidth: true
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
implicitHeight: 32
|
implicitHeight: 32
|
||||||
implicitWidth: 32
|
implicitWidth: 32
|
||||||
|
|
||||||
source: root.notificationIcon
|
source: root.notificationIcon.length > 0 ? root.notificationIcon[0] : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
CorrectedLabel {
|
CorrectedLabel {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
color: "white"
|
color: "white"
|
||||||
text: root.notification
|
text: root.notification.length > 0 ? root.notification[0] : ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -449,8 +458,14 @@ Item {
|
||||||
|
|
||||||
signal accepted()
|
signal accepted()
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
pageView.replaceCurrentItem(mainPage);
|
root.notification.shift();
|
||||||
root.resetFocus(true);
|
root.notificationIcon.shift();
|
||||||
|
|
||||||
|
if(root.notification.length == 0) {
|
||||||
|
pageView.replaceCurrentItem(mainPage);
|
||||||
|
root.resetFocus(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue