mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
added display of a notification that the server is busy installing third-party software
- refactoring doInstallAction functions
This commit is contained in:
@@ -20,13 +20,8 @@ class ServerConfiguringProgressLogic : public PageLogicBase
|
||||
AUTO_PROPERTY(int, progressBarMaximium)
|
||||
AUTO_PROPERTY(bool, progressBarTextVisible)
|
||||
AUTO_PROPERTY(QString, progressBarText)
|
||||
|
||||
public:
|
||||
explicit ServerConfiguringProgressLogic(UiLogic *uiLogic, QObject *parent = nullptr);
|
||||
~ServerConfiguringProgressLogic() = default;
|
||||
|
||||
void onUpdatePage() override;
|
||||
ErrorCode doInstallAction(const std::function<ErrorCode()> &action);
|
||||
AUTO_PROPERTY(bool, labelServerBusyVisible)
|
||||
AUTO_PROPERTY(QString, labelServerBusyText)
|
||||
|
||||
private:
|
||||
struct ProgressFunc {
|
||||
@@ -48,5 +43,23 @@ private:
|
||||
std::function<void(const QString&)> setTextFunc;
|
||||
};
|
||||
|
||||
public:
|
||||
explicit ServerConfiguringProgressLogic(UiLogic *uiLogic, QObject *parent = nullptr);
|
||||
~ServerConfiguringProgressLogic() = default;
|
||||
|
||||
friend class OpenVpnLogic;
|
||||
friend class ShadowSocksLogic;
|
||||
friend class CloakLogic;
|
||||
friend class UiLogic;
|
||||
|
||||
void onUpdatePage() override;
|
||||
ErrorCode doInstallAction(const std::function<ErrorCode()> &action);
|
||||
ErrorCode doInstallAction(const std::function<ErrorCode()> &action,
|
||||
const PageFunc &page,
|
||||
const ProgressFunc &progress,
|
||||
const ButtonFunc &button,
|
||||
const LabelFunc &waitInfo,
|
||||
const LabelFunc &serverBusyInfo);
|
||||
|
||||
};
|
||||
#endif // SERVER_CONFIGURING_PROGRESS_LOGIC_H
|
||||
|
||||
Reference in New Issue
Block a user