fix some struct and error
This commit is contained in:
7
Main.qml
7
Main.qml
@@ -6,6 +6,7 @@ import "qml/components" as Components
|
||||
import "qml/pages" as Pages
|
||||
import "qml/buttons" as Buttons
|
||||
import "qml/dialogs" as Dialogs
|
||||
import archpack
|
||||
|
||||
ApplicationWindow {
|
||||
id: root
|
||||
@@ -20,7 +21,6 @@ ApplicationWindow {
|
||||
color: Theme.color1
|
||||
|
||||
property string packageManager: "yay"
|
||||
property string sessionPassword: ""
|
||||
property bool consoleOpen: false
|
||||
|
||||
Component.onCompleted: ProcessManager.checkUpdates()
|
||||
@@ -69,7 +69,7 @@ ApplicationWindow {
|
||||
status: ProcessManager.status
|
||||
packages: ProcessManager.packages
|
||||
onUpdate: {
|
||||
if (ProcessManager.hasPassword())
|
||||
if (ProcessManager.passwordEmpty())
|
||||
{
|
||||
passwordDialog.open();
|
||||
return;
|
||||
@@ -90,8 +90,8 @@ ApplicationWindow {
|
||||
|
||||
readonly property string consoleTitle: tabs.currentIndex === 0 ? "Консоль обновления" : tabs.currentIndex === 1 ? "Консоль установки" : "Консоль удаления"
|
||||
readonly property string consoleStatus: Utils.statusConsole(tabs.currentIndex, ProcessManager.status)
|
||||
// readonly property var consoleLog: tabs.currentIndex === 0 ? ProcessManager.updateLog : tabs.currentIndex === 1 ? UpdateManager.installLog : UpdateManager.removalLog
|
||||
readonly property var consoleLog: tabs.currentIndex === 0 ? ProcessManager.updateLog : []
|
||||
// readonly property var consoleLog: tabs.currentIndex === 0 ? ProcessManager.updateLog : tabs.currentIndex === 1 ? UpdateManager.installLog : UpdateManager.removalLog
|
||||
|
||||
Components.ConsoleBar {
|
||||
id: consoleBar
|
||||
@@ -114,6 +114,7 @@ ApplicationWindow {
|
||||
id: passwordDialog
|
||||
onPasswordEntered: (password) => {
|
||||
ProcessManager.setPassword(password);
|
||||
consoleBar.status = root.consoleOpen;
|
||||
ProcessManager.update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user