feature: added page for export api native configs

This commit is contained in:
vladimir.kuznetsov 2025-02-07 22:22:14 +07:00
parent 389c1f5327
commit 42d3d9b98a
30 changed files with 461 additions and 129 deletions

View file

@ -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