feat: recognize recovery devices & add heic support

- Added RecoveryDeviceSidebarItem class for managing recovery devices in the sidebar.
- Unified device selection structure with DeviceSelection to handle normal, recovery, and pending devices.
- Updated DeviceSidebarWidget to support adding and removing recovery devices.
- Refactored sidebar navigation and selection handling to accommodate new device types.

refactor: Enhance Disk Usage Widget UI

- Improved styling and layout of disk usage bars for better visual representation.
- Removed unnecessary paint event override and adjusted layout settings.
- Added object names for easier styling and debugging.

fix: Update File Explorer Widget for AFC2 Support

- Integrated a stacked widget to switch between normal and AFC2 explorers.
- Simplified sidebar setup and item handling for better maintainability.
- Connected sidebar item clicks to switch between AFC explorers.

feat: Implement InfoLabel for Copying Text

- Created InfoLabel class to display text that can be copied to the clipboard.
- Added hover effects and temporary text change on copy action.

chore: Clean up Unused Code and Comments

- Removed commented-out code and unnecessary forward declarations across multiple files.
- Streamlined includes and improved code readability.

fix: Improve Recovery Device Info Widget

- Updated RecoveryDeviceInfoWidget to display device information more clearly.
- Added error handling for recovery mode exit operations with user feedback.

feat: Add Responsive QLabel for Image Display

- Introduced ResponsiveQLabel to handle responsive image scaling in the UI.
- Replaced static image display with responsive label in JailbrokenWidget for better adaptability.
This commit is contained in:
uncor3
2025-10-08 05:00:02 +00:00
parent ef56f7af33
commit 777ea21a00
34 changed files with 921 additions and 645 deletions
-46
View File
@@ -17,52 +17,6 @@
#include <QVBoxLayout>
#include <QtConcurrent/QtConcurrent>
// todo: create a service
QByteArray read_afc_file_to_byte_array(afc_client_t afcClient, const char *path)
{
uint64_t fd_handle = 0;
afc_error_t fd_err =
afc_file_open(afcClient, path, AFC_FOPEN_RDONLY, &fd_handle);
if (fd_err != AFC_E_SUCCESS) {
qDebug() << "Could not open file" << path;
return QByteArray();
}
// TODO: is this necessary
char **info = NULL;
afc_get_file_info(afcClient, path, &info);
uint64_t fileSize = 0;
if (info) {
for (int i = 0; info[i]; i += 2) {
if (strcmp(info[i], "st_size") == 0) {
fileSize = std::stoull(info[i + 1]);
break;
}
}
afc_dictionary_free(info);
}
if (fileSize == 0) {
afc_file_close(afcClient, fd_handle);
return QByteArray();
}
QByteArray buffer;
buffer.resize(fileSize);
uint32_t bytesRead = 0;
afc_file_read(afcClient, fd_handle, buffer.data(), buffer.size(),
&bytesRead);
if (bytesRead != fileSize) {
qDebug() << "AFC Error: Read mismatch for file" << path;
return QByteArray(); // Read failed
}
return buffer;
};
void GalleryWidget::load()
{
if (m_loaded)