fix(ManagedPackPage): better UX for when network requests fail / are pending

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-11-11 17:44:16 -03:00
parent 9539230915
commit d4979974b4
3 changed files with 50 additions and 3 deletions

View File

@ -51,12 +51,22 @@ class ManagedPackPage : public QWidget, public BasePage {
void setInstanceWindow(InstanceWindow* window) { m_instance_window = window; }
public slots:
/** Gets the current version selection and update the changelog.
/** Gets the current version selection and update the UI, including the update button and the changelog.
*/
virtual void suggestVersion() {};
virtual void suggestVersion();
virtual void update() {};
protected slots:
/** Does the necessary UI changes for when something failed.
*
* This includes:
* - Setting an appropriate text on the version selector to indicate a fail;
* - Setting an appropriate text on the changelog text browser to indicate a fail;
* - Disable the update button.
*/
void setFailState();
protected:
ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_window, QWidget* parent = nullptr);