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);
|
2022-03-08 19:42:35 +05:30
|
|
|
~ModrinthPage() override = default;
|
2022-01-15 13:21:47 +05:30
|
|
|
|
2022-03-08 19:42:35 +05:30
|
|
|
inline auto displayName() const -> QString override { return tr("Modrinth"); }
|
|
|
|
inline auto icon() const -> QIcon override { return APPLICATION->getThemedIcon("modrinth"); }
|
|
|
|
inline auto id() const -> QString override { return "modrinth"; }
|
|
|
|
inline auto helpPage() const -> QString override { return "Modrinth-platform"; }
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-08 19:42:35 +05:30
|
|
|
inline auto debugName() const -> QString override { return tr("Modrinth"); }
|
|
|
|
inline auto metaEntryBase() const -> QString override { return "ModrinthPacks"; };
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-08 19:42:35 +05:30
|
|
|
auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const -> bool override;
|
2022-01-14 14:13:42 +05:30
|
|
|
|
2022-03-08 19:42:35 +05:30
|
|
|
auto shouldDisplay() const -> bool override;
|
2022-01-14 14:13:42 +05:30
|
|
|
};
|