feature: added page for export api native configs
This commit is contained in:
parent
389c1f5327
commit
42d3d9b98a
30 changed files with 461 additions and 129 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "core/api/apiDefs.h"
|
||||
|
||||
class ApiAccountInfoModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -27,29 +29,23 @@ public slots:
|
|||
void updateModel(const QJsonObject &accountInfoObject, const QJsonObject &serverConfig);
|
||||
QVariant data(const QString &roleString);
|
||||
|
||||
QJsonArray getAvailableCountries();
|
||||
|
||||
protected:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private:
|
||||
struct CountryInfo
|
||||
{
|
||||
QString serverCountryCode;
|
||||
QString serverCountryName;
|
||||
QString lastUpdated;
|
||||
};
|
||||
|
||||
struct AccountInfoData
|
||||
{
|
||||
QString subscriptionEndDate;
|
||||
int activeDeviceCount;
|
||||
int maxDeviceCount;
|
||||
|
||||
QString vpnKey;
|
||||
|
||||
QVector<CountryInfo> AvailableCountries;
|
||||
apiDefs::ConfigType configType;
|
||||
};
|
||||
|
||||
AccountInfoData m_accountInfoData;
|
||||
QJsonArray m_availableCountries;
|
||||
};
|
||||
|
||||
#endif // APIACCOUNTINFOMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue