parent
459920657c
commit
03c19c4f60
23
qml/main.qml
23
qml/main.qml
|
@ -39,6 +39,10 @@ ApplicationWindow {
|
||||||
window.requestActivate()
|
window.requestActivate()
|
||||||
}
|
}
|
||||||
onHideWindow: window.hide()
|
onHideWindow: window.hide()
|
||||||
|
onErrorOccured: {
|
||||||
|
errorLabel.text = error
|
||||||
|
errorDialog.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountListModel {
|
AccountListModel {
|
||||||
|
@ -46,22 +50,15 @@ ApplicationWindow {
|
||||||
controller: spectralController
|
controller: spectralController
|
||||||
}
|
}
|
||||||
|
|
||||||
Popup {
|
Dialog {
|
||||||
property bool busy: spectralController.busy
|
|
||||||
|
|
||||||
x: (window.width - width) / 2
|
x: (window.width - width) / 2
|
||||||
y: (window.height - height) / 2
|
y: (window.height - height) / 2
|
||||||
|
|
||||||
id: busyPopup
|
id: errorDialog
|
||||||
|
title: "Error"
|
||||||
modal: true
|
contentItem: Label {
|
||||||
focus: true
|
id: errorLabel
|
||||||
|
}
|
||||||
closePolicy: Popup.NoAutoClose
|
|
||||||
|
|
||||||
BusyIndicator { running: true }
|
|
||||||
|
|
||||||
onBusyChanged: busyPopup.busy ? busyPopup.open() : busyPopup.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
|
@ -73,6 +73,9 @@ void Controller::loginWithCredentials(QString serverAddr, QString user,
|
||||||
account.sync();
|
account.sync();
|
||||||
addConnection(m_connection);
|
addConnection(m_connection);
|
||||||
});
|
});
|
||||||
|
connect(m_connection, &Connection::loginError, [=] (QString error, QByteArray detail) {
|
||||||
|
emit errorOccured(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue