2022-01-14 14:13:42 +05:30
|
|
|
#pragma once
|
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
#include "ui/pages/modplatform/ModPage.h"
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-03 07:31:23 +05:30
|
|
|
#include "modplatform/modrinth/ModrinthAPI.h"
|
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
class ModrinthPage : public ModPage {
|
2022-01-14 14:13:42 +05:30
|
|
|
Q_OBJECT
|
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
public:
|
|
|
|
explicit ModrinthPage(ModDownloadDialog* dialog, BaseInstance* instance);
|
|
|
|
virtual ~ModrinthPage() = default;
|
2022-01-15 13:21:47 +05:30
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
inline QString displayName() const override { return tr("Modrinth"); }
|
|
|
|
inline QIcon icon() const override { return APPLICATION->getThemedIcon("modrinth"); }
|
|
|
|
inline QString id() const override { return "modrinth"; }
|
|
|
|
inline QString helpPage() const override { return "Modrinth-platform"; }
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
inline QString debugName() const override { return tr("Modrinth"); }
|
|
|
|
inline QString metaEntryBase() const override { return "ModrinthPacks"; };
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
bool shouldDisplay() const override;
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-03 05:47:10 +05:30
|
|
|
private:
|
2022-03-06 23:53:00 +05:30
|
|
|
void onGetVersionsSucceeded(ModPage*, QByteArray*, QString) override;
|
2022-01-14 14:13:42 +05:30
|
|
|
};
|