## New features - Implemented support for app packaging in firmware and `tactility.py`: load `.app` files instead of `.elf` files. Install apps remotely or via `FileBrowser`. - Ensure headless mode works: all services that require LVGL can deal with the absence of a display - Service `onStart()` is now allowed to fail (return `bool` result) - Added and improved various file-related helper functions ## Improvements - Completely revamped the SystemInfo app UI - Improved Calculator UI of internal and external variant - Fix Chat UI and removed the emoji buttons for now - Fix for toolbar bottom padding issue in all apps ## Fixes - Fix for allowing recursive locking for certain SPI SD cards & more
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#include "Tactility/app/filebrowser/View.h"
|
|
#include "Tactility/app/filebrowser/State.h"
|
|
#include "Tactility/app/AppContext.h"
|
|
|
|
#include <Tactility/Assets.h>
|
|
#include <Tactility/service/loader/Loader.h>
|
|
|
|
#include <memory>
|
|
|
|
namespace tt::app::filebrowser {
|
|
|
|
constexpr auto* TAG = "FileBrowser";
|
|
|
|
extern const AppManifest manifest;
|
|
|
|
class FileBrowser : public App {
|
|
std::unique_ptr<View> view;
|
|
std::shared_ptr<State> state;
|
|
|
|
public:
|
|
FileBrowser() {
|
|
state = std::make_shared<State>();
|
|
view = std::make_unique<View>(state);
|
|
}
|
|
|
|
void onShow(AppContext& appContext, lv_obj_t* parent) override {
|
|
view->init(parent);
|
|
}
|
|
|
|
void onResult(AppContext& appContext, TT_UNUSED LaunchId launchId, Result result, std::unique_ptr<Bundle> bundle) override {
|
|
view->onResult(launchId, result, std::move(bundle));
|
|
}
|
|
};
|
|
|
|
extern const AppManifest manifest = {
|
|
.id = "Files",
|
|
.name = "Files",
|
|
.icon = TT_ASSETS_APP_ICON_FILES,
|
|
.type = Type::Hidden,
|
|
.createApp = create<FileBrowser>
|
|
};
|
|
|
|
void start() {
|
|
service::loader::startApp(manifest.id);
|
|
}
|
|
|
|
} // namespace
|