NOISSUE Curseforge makeover

update UI to match other modpack platforms
add sorting
add version selection, fixes GH-3667
add installing beta versions, fixes GH-3611
This commit is contained in:
phit
2021-03-26 23:15:20 +01:00
parent 5400d4e613
commit 1f8408c793
10 changed files with 332 additions and 220 deletions

View File

@ -0,0 +1,43 @@
#pragma once
#include <QList>
#include <QMetaType>
#include <QString>
#include <QVector>
#include "multimc_logic_export.h"
namespace Flame {
struct ModpackAuthor {
QString name;
QString url;
};
struct IndexedVersion {
int addonId;
int fileId;
QString version;
QString mcVersion;
QString downloadUrl;
};
struct IndexedPack
{
int addonId;
QString name;
QString description;
QList<ModpackAuthor> authors;
QString logoName;
QString logoUrl;
QString websiteUrl;
bool versionsLoaded = false;
QVector<IndexedVersion> versions;
};
MULTIMC_LOGIC_EXPORT void loadIndexedPack(IndexedPack & m, QJsonObject & obj);
MULTIMC_LOGIC_EXPORT void loadIndexedPackVersions(IndexedPack & m, QJsonArray & arr);
}
Q_DECLARE_METATYPE(Flame::IndexedPack)