flow improvements

This commit is contained in:
2026-04-25 16:02:39 +03:00
parent 22b669fae0
commit 4ffa6ed970
21 changed files with 150 additions and 59 deletions
+3
View File
@@ -1,12 +1,15 @@
#include <pu/Plutonium>
#include <const.h>
#include <title.hpp>
#include <account.hpp>
#include <unordered_map>
namespace ui {
class TitlesLayout : public pu::ui::Layout {
private:
pu::ui::elm::Menu::Ref titlesMenu;
std::unordered_map<AccountUid, pu::ui::elm::Menu::Ref> menuCache;
bool m_inputLocked = false;
public:
+14
View File
@@ -51,6 +51,20 @@ namespace ui {
void SetProgress(double val) {
progressBar->SetProgress(val);
}
void SetProgressVisible(bool visible) {
progressBar->SetVisible(visible);
if (visible) {
this->SetHeight(OvlH);
this->SetY(OvlY);
hintText->SetY(195);
} else {
static constexpr int SmallH = 160;
this->SetHeight(SmallH);
this->SetY((720 - SmallH) / 2);
hintText->SetY(120);
}
}
};
}
+2
View File
@@ -7,6 +7,8 @@ namespace ui {
private:
pu::ui::elm::Menu::Ref usersMenu;
pu::ui::elm::Rectangle::Ref loadingBg;
pu::ui::elm::TextBlock::Ref loadingText;
public:
+2 -1
View File
@@ -54,7 +54,8 @@ inline bool operator==(const AccountUid& x, u64 y)
inline bool operator<(const AccountUid& x, const AccountUid& y)
{
return x.uid[0] < y.uid[0] && x.uid[1] == y.uid[1];
if (x.uid[0] != y.uid[0]) return x.uid[0] < y.uid[0];
return x.uid[1] < y.uid[1];
}
struct User {
+1
View File
@@ -5,6 +5,7 @@ int transfer_files(size_t index, AccountUid uid);
bool isClientTransferDone();
bool isClientTransferCancelled();
bool isClientConnectionFailed();
bool isClientProgressKnown();
void cancelClientTransfer();
double getClientProgress();
std::string getClientStatusText();
+4 -3
View File
@@ -48,9 +48,10 @@ public:
template <typename... Args>
void log(const std::string& level, const std::string& format = {}, Args... args)
{
// xcbuffer += StringUtils::format(("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
printf("%s\n", format.c_str());
// printf("%s\n",StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
// buffer += StringUtils::format(("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
// buffer += StringUtils::format("%s\n", format.c_str());
// buffer += StringUtils::format("%s\n",StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
printf(StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
}
void flush(void)
+1
View File
@@ -82,6 +82,7 @@ private:
void getTitle(Title& dst, AccountUid uid, size_t i);
size_t getTitleCount(AccountUid uid);
void loadTitles(void);
bool areTitlesLoaded(void);
void sortTitles(void);
void rotateSortMode(void);
void refreshDirectories(u64 id);