2020-12-12 16:41:56 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <borealis.hpp>
|
2021-06-28 00:46:00 +02:00
|
|
|
#include <json.hpp>
|
|
|
|
#include <set>
|
2020-12-12 16:41:56 +01:00
|
|
|
|
|
|
|
class AmsTab : public brls::List
|
|
|
|
{
|
|
|
|
private:
|
2021-02-06 18:24:47 +01:00
|
|
|
brls::ListItem* listItem;
|
2020-12-12 16:41:56 +01:00
|
|
|
brls::Label *description;
|
2021-07-21 15:38:43 +02:00
|
|
|
int size = 0;
|
2021-06-28 00:46:00 +02:00
|
|
|
bool erista;
|
2021-07-21 15:38:43 +02:00
|
|
|
nlohmann::ordered_json cfws = {};
|
2021-06-28 00:46:00 +02:00
|
|
|
std::string GetRepoName(const std::string& repo);
|
|
|
|
std::set<std::string> GetLastDownloadedModules(const std::string& json_path);
|
|
|
|
void CreateStagedFrames(const std::string& text, const std::string& url, const std::string& operation, bool erista, bool hekate = false, const std::string& text_hekate = "", const std::string& hekate_url = "");
|
2021-07-09 01:14:07 +02:00
|
|
|
void CreateDownloadItems(const nlohmann::ordered_json& cfw_links, bool hekate = true);
|
2021-06-28 00:46:00 +02:00
|
|
|
nlohmann::ordered_json SortDeepseaModules(const nlohmann::ordered_json& modules);
|
2021-07-07 16:59:52 +02:00
|
|
|
void ShowCustomDeepseaBuilder(nlohmann::ordered_json& modules);
|
2021-06-28 00:46:00 +02:00
|
|
|
|
2020-12-12 16:41:56 +01:00
|
|
|
public:
|
2021-07-21 15:38:43 +02:00
|
|
|
AmsTab(const bool erista = true, const bool hideStandardEntries = false);
|
|
|
|
brls::View* getDefaultFocus() override;
|
2021-06-28 00:46:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class UnTogglableListItem : public brls::ToggleListItem
|
|
|
|
{
|
|
|
|
public:
|
2021-07-17 14:29:55 +02:00
|
|
|
UnTogglableListItem(const std::string& label, bool initialValue, std::string description = "", std::string onValue = "On", std::string offValue = "Off") : ToggleListItem(label, initialValue, description, onValue, offValue) {}
|
2021-06-28 00:46:00 +02:00
|
|
|
virtual bool onClick() override;
|
2020-12-12 16:41:56 +01:00
|
|
|
};
|