1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-12 21:26:40 +00:00
AIO-switch-updater/include/ams_tab.hpp

32 lines
1.3 KiB
C++
Raw Normal View History

#pragma once
#include <borealis.hpp>
#include <json.hpp>
#include <set>
2022-09-06 19:45:26 +01:00
#include "constants.hpp"
class AmsTab : public brls::List
{
2021-09-11 14:48:13 +01:00
private:
brls::ListItem* listItem;
bool erista;
2022-09-06 19:45:26 +01:00
contentType type;
2021-09-15 16:23:37 +01:00
nlohmann::ordered_json hekate;
2021-09-11 14:48:13 +01:00
std::string GetRepoName(const std::string& repo);
std::set<std::string> GetLastDownloadedModules(const std::string& json_path);
2022-09-06 19:45:26 +01:00
void CreateStagedFrames(const std::string& text, const std::string& url, bool erista, bool ams = true, bool hekate = false, const std::string& text_hekate = "", const std::string& hekate_url = "");
void CreateDownloadItems(const nlohmann::ordered_json& cfw_links, bool hekate = true, bool ams = true);
2021-09-11 14:48:13 +01:00
nlohmann::ordered_json SortDeepseaModules(const nlohmann::ordered_json& modules);
void ShowCustomDeepseaBuilder(nlohmann::ordered_json& modules);
2021-09-11 14:48:13 +01:00
public:
2022-09-06 19:45:26 +01:00
AmsTab(const nlohmann::json& nxlinks, const bool erista = true, const bool custom = false);
};
class UnTogglableListItem : public brls::ToggleListItem
{
2021-09-11 14:48:13 +01:00
public:
UnTogglableListItem(const std::string& label, bool initialValue, std::string description = "", std::string onValue = "On", std::string offValue = "Off") : ToggleListItem(label, initialValue, description, onValue, offValue) {}
virtual bool onClick() override;
};