add check password
This commit is contained in:
18
Main.qml
18
Main.qml
@@ -30,6 +30,19 @@ ApplicationWindow {
|
||||
if (ProcessManager.status === ProcessManager.Status.Updating)
|
||||
root.consoleOpen = true
|
||||
}
|
||||
|
||||
function onPasswordAccepted() {
|
||||
passwordDialog.checking = false;
|
||||
if (!passwordDialog.visible) return;
|
||||
passwordDialog.accept();
|
||||
ProcessManager.update();
|
||||
}
|
||||
|
||||
function onPasswordRejected(reason) {
|
||||
passwordDialog.checking = false;
|
||||
if (!passwordDialog.visible) return;
|
||||
passwordDialog.errorText = reason;
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@@ -119,9 +132,6 @@ ApplicationWindow {
|
||||
|
||||
Dialogs.PasswordDialog {
|
||||
id: passwordDialog
|
||||
onPasswordEntered: (password) => {
|
||||
ProcessManager.setPassword(password);
|
||||
ProcessManager.update();
|
||||
}
|
||||
onPasswordSubmitted: (password) => ProcessManager.checkPassword(password)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user