mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-11-09 12:01:44 +00:00
Add information to footer
This commit is contained in:
parent
aeef0afe63
commit
a73e242666
3 changed files with 20 additions and 9 deletions
|
@ -114,7 +114,8 @@
|
|||
"download_firmware": "Download firmwares",
|
||||
"download_cheats": "Download cheats",
|
||||
"tools": "Tools",
|
||||
"launch_warning": "Please pay attention to the following points before using the app:\n\n\ue016 Read up on how to manually update your Switch first. This will help you understand the app better and you'll know what to do in case something goes wrong.\n\ue016 Please note that using this app (or any homebrew) on a exFAT SD card is not recommended, as those are more likely to corrupt.\n\n\ue016 Some new features and/or changes regarding current features may have been introduced. Please check them out via the Tools->Changelog menu.\n\nThis screen won't show again."
|
||||
"launch_warning": "Please pay attention to the following points before using the app:\n\n\ue016 Read up on how to manually update your Switch first. This will help you understand the app better and you'll know what to do in case something goes wrong.\n\ue016 Please note that using this app (or any homebrew) on a exFAT SD card is not recommended, as those are more likely to corrupt.\n\n\ue016 Some new features and/or changes regarding current features may have been introduced. Please check them out via the Tools->Changelog menu.\n\nThis screen won't show again.",
|
||||
"GB_available": "GB available"
|
||||
},
|
||||
"hide": {
|
||||
"title": "Hide tabs",
|
||||
|
|
|
@ -12,21 +12,27 @@ namespace i18n = brls::i18n;
|
|||
using namespace i18n::literals;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace {
|
||||
constexpr const char AppTitle[] = APP_TITLE;
|
||||
constexpr const char AppVersion[] = APP_VERSION;
|
||||
}
|
||||
|
||||
MainFrame::MainFrame() : TabFrame()
|
||||
{
|
||||
this->setIcon("romfs:/gui_icon.png");
|
||||
this->setTitle(std::string(APP_TITLE));
|
||||
this->setTitle(AppTitle);
|
||||
|
||||
s64 freeStorage;
|
||||
std::string tag = util::getLatestTag(TAGS_INFO);
|
||||
if(!tag.empty() && tag != APP_VERSION)
|
||||
this->setFooterText("v" + std::string(APP_VERSION) + "menus/main/new_update"_i18n);
|
||||
else
|
||||
this->setFooterText("v" + std::string(APP_VERSION));
|
||||
|
||||
this->setFooterText(fmt::format("v{} | {:.1f}{}",
|
||||
(!tag.empty() && tag != AppVersion) ? AppVersion + "menus/main/new_update"_i18n : AppVersion,
|
||||
R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) ? (float)freeStorage/0x40000000 : -1,
|
||||
"menus/main/GB_available"_i18n)
|
||||
);
|
||||
|
||||
json hideStatus = fs::parseJsonFile(HIDE_TABS_JSON);
|
||||
|
||||
bool erista = util::isErista();
|
||||
//bool erista = false;
|
||||
|
||||
if(hideStatus.find("about") == hideStatus.end() || !hideStatus["about"])
|
||||
this->addTab("menus/main/about"_i18n, new AboutTab());
|
||||
|
|
|
@ -20,9 +20,13 @@ namespace i18n = brls::i18n;
|
|||
using namespace i18n::literals;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace {
|
||||
constexpr const char AppVersion[] = APP_VERSION;
|
||||
}
|
||||
|
||||
ToolsTab::ToolsTab(std::string tag, bool erista) : brls::List()
|
||||
{
|
||||
if(!tag.empty() && tag != APP_VERSION){
|
||||
if(!tag.empty() && tag != AppVersion){
|
||||
updateApp = new brls::ListItem("menus/tools/update_app"_i18n + tag +")");
|
||||
std::string text("menus/tools/dl_app"_i18n + std::string(APP_URL));
|
||||
updateApp->getClickEvent()->subscribe([&, text, tag](brls::View* view) {
|
||||
|
|
Loading…
Reference in a new issue