1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-24 18:42:05 +00:00
This commit is contained in:
rashevskyv 2021-09-28 15:03:32 +02:00 committed by flb
parent 91b3a79fa8
commit ee181c011d
4 changed files with 56 additions and 4 deletions

View file

@ -9,10 +9,20 @@ private:
brls::Label* label; brls::Label* label;
brls::ToggleListItem* about; brls::ToggleListItem* about;
brls::ToggleListItem* ams; brls::ToggleListItem* ams;
brls::ToggleListItem* atmosphereentries;
brls::ToggleListItem* cfws; brls::ToggleListItem* cfws;
brls::ToggleListItem* sigpatches; brls::ToggleListItem* sigpatches;
brls::ToggleListItem* fws; brls::ToggleListItem* fws;
brls::ToggleListItem* cheats; brls::ToggleListItem* cheats;
brls::ToggleListItem* jccolor;
brls::ToggleListItem* pccolor;
brls::ToggleListItem* downloadpayload;
brls::ToggleListItem* rebootpayload;
brls::ToggleListItem* netsettings;
brls::ToggleListItem* browser;
brls::ToggleListItem* move;
brls::ToggleListItem* cleanup;
brls::ToggleListItem* language;
public: public:
HideTabsPage(); HideTabsPage();

View file

@ -139,7 +139,8 @@
}, },
"hide": { "hide": {
"title": "Hide tabs", "title": "Hide tabs",
"desc": "Hide tabs from the main menu" "desc": "Hide tabs from the main menu",
"update_ams_deepsea": "Atmosphere and DeepSea downloads"
}, },
"tools": { "tools": {
"cheats": "Cheats menu", "cheats": "Cheats menu",

View file

@ -41,14 +41,55 @@ HideTabsPage::HideTabsPage() : AppletFrame(true, true)
cheats = new brls::ToggleListItem("menus/main/download_cheats"_i18n, util::getBoolValue(hideStatus, "cheats")); cheats = new brls::ToggleListItem("menus/main/download_cheats"_i18n, util::getBoolValue(hideStatus, "cheats"));
list->addView(cheats); list->addView(cheats);
jccolor = new brls::ToggleListItem("menus/tools/joy_cons"_i18n, util::getBoolValue(hideStatus, "jccolor"));
list->addView(jccolor);
pccolor = new brls::ToggleListItem("menus/tools/pro_cons"_i18n, util::getBoolValue(hideStatus, "pccolor"));
list->addView(pccolor);
downloadpayload = new brls::ToggleListItem("menus/tools/dl_payloads"_i18n, util::getBoolValue(hideStatus, "downloadpayload"));
list->addView(downloadpayload);
rebootpayload = new brls::ToggleListItem("menus/tools/inject_payloads"_i18n, util::getBoolValue(hideStatus, "rebootpayload"));
list->addView(rebootpayload);
netsettings = new brls::ToggleListItem("menus/tools/internet_settings"_i18n, util::getBoolValue(hideStatus, "netsettings"));
list->addView(netsettings);
browser = new brls::ToggleListItem("menus/tools/browser"_i18n, util::getBoolValue(hideStatus, "browser"));
list->addView(browser);
move = new brls::ToggleListItem("menus/tools/batch_copy"_i18n, util::getBoolValue(hideStatus, "move"));
list->addView(move);
cleanup = new brls::ToggleListItem("menus/tools/clean_up"_i18n, util::getBoolValue(hideStatus, "cleanup"));
list->addView(cleanup);
language = new brls::ToggleListItem("menus/tools/language"_i18n, util::getBoolValue(hideStatus, "language"));
list->addView(language);
atmosphereentries = new brls::ToggleListItem("menus/hide/update_ams_deepsea"_i18n, util::getBoolValue(hideStatus, "atmosphereentries"));
list->addView(atmosphereentries);
list->registerAction("menus/cheats/exclude_titles_save"_i18n, brls::Key::B, [this] { list->registerAction("menus/cheats/exclude_titles_save"_i18n, brls::Key::B, [this] {
json updatedStatus = json::object(); json updatedStatus = json::object();
updatedStatus["about"] = about->getToggleState(); updatedStatus["about"] = about->getToggleState();
updatedStatus["atmosphere"] = ams->getToggleState(); updatedStatus["atmosphere"] = ams->getToggleState();
updatedStatus["atmosphereentries"] = atmosphereentries->getToggleState();
updatedStatus["cfw"] = cfws->getToggleState(); updatedStatus["cfw"] = cfws->getToggleState();
updatedStatus["sigpatches"] = sigpatches->getToggleState(); updatedStatus["sigpatches"] = sigpatches->getToggleState();
updatedStatus["firmwares"] = fws->getToggleState(); updatedStatus["firmwares"] = fws->getToggleState();
updatedStatus["cheats"] = cheats->getToggleState(); updatedStatus["cheats"] = cheats->getToggleState();
updatedStatus["jccolor"] = jccolor->getToggleState();
updatedStatus["pccolor"] = pccolor->getToggleState();
updatedStatus["downloadpayload"] = downloadpayload->getToggleState();
updatedStatus["rebootpayload"] = rebootpayload->getToggleState();
updatedStatus["netsettings"] = netsettings->getToggleState();
updatedStatus["browser"] = browser->getToggleState();
updatedStatus["move"] = move->getToggleState();
updatedStatus["cleanup"] = cleanup->getToggleState();
updatedStatus["language"] = language->getToggleState();
fs::writeJsonToFile(updatedStatus, HIDE_TABS_JSON); fs::writeJsonToFile(updatedStatus, HIDE_TABS_JSON);
brls::Application::popView(); brls::Application::popView();
return true; return true;

View file

@ -239,6 +239,6 @@ ToolsTab::ToolsTab(const std::string& tag, const nlohmann::ordered_json& payload
if (!util::getBoolValue(hideStatus, "move")) this->addView(move); if (!util::getBoolValue(hideStatus, "move")) this->addView(move);
if (!util::getBoolValue(hideStatus, "cleanup")) this->addView(cleanUp); if (!util::getBoolValue(hideStatus, "cleanup")) this->addView(cleanUp);
if (!util::getBoolValue(hideStatus, "language")) this->addView(language); if (!util::getBoolValue(hideStatus, "language")) this->addView(language);
if (!util::getBoolValue(hideStatus, "hidetabs")) this->addView(hideTabs); this->addView(hideTabs);
this->addView(changelog); this->addView(changelog);
} }