35 Commits

Author SHA1 Message Date
SuperKali
07879be87c feat: replace liblzma with lzma-rust2 for multi-threaded XZ decompression
- Replace liblzma C bindings with native Rust lzma-rust2 library
- Use XzReaderMt for parallel decompression across all platforms
- Remove dependency on system xz command
- Use get_recommended_threads() to utilize half of CPU cores
- Clean up unused find_binary and get_binary_search_paths functions
- Update module documentation to reflect native Rust approach

This change provides consistent multi-threaded decompression performance
across macOS, Linux, and Windows without requiring external tools.
2025-12-26 01:28:07 +01:00
SuperKali
ab0a9c3959 feat: rewrite Windows device detection with native Win32 APIs
Replace PowerShell with Win32 APIs (CreateFileW, DeviceIoControl) for reliable
device enumeration on all Windows editions.

Key improvements:
- Add IOCTL_DISK_GET_DRIVE_GEOMETRY_EX for disk size and geometry
- Add IOCTL_STORAGE_QUERY_PROPERTY for bus type and model detection
- Add drive letter mapping via GetLogicalDrives() and volume extents
- Fix system disk detection (check for C: drive instead of assuming disk 0)
- Add smart stop: halt enumeration after 4 consecutive non-existent drives
- Refactor: extract helpers, reduce code by 26% (475→349 lines)

Error handling:
- Suppress expected errors (1,2,5,21) to eliminate log spam
- Only log unexpected device failures

Fixes device enumeration failures on Windows editions without PowerShell.
2025-12-26 00:12:46 +01:00
SuperKali
224edd1463 feat: update system and changelog modal improvements
- Add GitHub release fetching command in Rust backend
- Implement changelog modal with contributor avatars
- Improve update modal UI with modern styling
- Add "What's New" button linking to changelog
- Remove GitHub issue links from changelog (keep attribution)
- Fix contributor section spacing and alignment
- Add manufacturer logo container contrast for light mode
- Improve bullet alignment in changelog

Translation updates:
- Add common.confirm key to all 15 languages
- Remove orphaned modal.scanningDevices key
- Add update contributors key to all locales
2025-12-25 18:23:58 +01:00
SuperKali
3011dd7094 Fix image extension filter to include oowow.img.xz and similar files 2025-12-22 22:17:04 +01:00
SuperKali
802d1fdecc Apply rustfmt formatting and fix Clippy warnings 2025-12-22 14:34:35 +01:00
SuperKali
e306ddcb0b Disable updater for non-AppImage Linux installations 2025-12-21 23:05:36 +01:00
SuperKali
c9fc93135e Fix Windows flash access denied and UI freeze issues
- Replace PowerShell-based partition discovery with Windows API
  (FindFirstVolumeW/FindNextVolumeW, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS)
- Lock and dismount volumes before raw disk access using
  FSCTL_LOCK_VOLUME and FSCTL_DISMOUNT_VOLUME
- Keep volume handles open during operation to prevent Windows remount
- Use FILE_FLAG_WRITE_THROUGH for writes, FILE_FLAG_NO_BUFFERING for
  verification to bypass OS cache
- Fix intermittent UI freeze by releasing volume locks in background
  threads with FSCTL_UNLOCK_VOLUME before CloseHandle
- Add sector-aligned reads for verification when using NO_BUFFERING
2025-12-21 21:07:11 +01:00
SuperKali
39535f5de7 Add board support badges and codebase cleanup
Board Support Badges:
- Add support level badges (Platinum, Standard, Community, EOS, TV Box, WIP)
- Parse board_support field from API (conf, csc, eos, tvb, wip)
- Platinum badge requires board_support=conf AND platinum=true with valid date
- Add badge icons using lucide-react (Crown, Shield, Users, Clock, Tv, Wrench)
- Fix badge alignment to always display at bottom of board cards

Backend (Rust):
- Add board_support field parsing in filters.rs and models.rs
- Add serde aliases for JSON field mapping
- Log board statistics with custom log_info! macro

Frontend Cleanup:
- Remove ~180 lines of unused CSS (grids, cards, headers)
- Remove unused constants (UI_INTERVALS, ICON_SIZES)
- Remove unused functions (getDeviceTypeLabel, checkDeviceConnection)
- Consolidate DEVICE_POLL_INTERVAL into POLLING.DEVICE_CHECK
- Fix unused variable warning in useVendorLogos.ts
- Add eslint-disable comments where needed

README Updates:
- Update data source URLs with correct paths
- Update project structure (flash/, layout/, modals/, utils/)
2025-12-21 01:18:18 +01:00
SuperKali
ddf7b0a8a5 Add device disconnect detection, decompression formats, and UI improvements
- Monitor device connection during all flash stages (download, SHA verify, decompress, write, verify)
- Show "Device was disconnected" error instead of generic errors when device is removed
- Re-request authorization on retry after disconnect
- Add GZ, BZ2, ZSTD decompression support alongside XZ
- Log update availability at startup via frontend logging
- Fix Update Modal button sizing (equal width)
- Disable text selection globally in production
- Update README: download badge, macOS Privacy & Security instructions
- Add deviceDisconnected translation to all 15 languages
- Various code quality improvements (unwrap → expect, try/finally cleanup)
2025-12-20 00:42:25 +01:00
SuperKali
8fc41d1932 Add SHA256 verification, API updates, locale alignment, logging improvements
Features:
- Add SHA256 checksum verification after download (before decompression)
- Support cancellation during decompression phase
- Reset storage selection when cancelling flash operation
- Improve log format with ANSI colors for hastebin upload

API & Data:
- Switch to armbian-images.json endpoint (from all-images.json)
- Use board_name from API instead of local board_names.json lookup
- Add file_url_sha field for SHA256 verification
- Remove deprecated board_names.json file
- Add new vendors: Allwinner, ARM, SpacemiT, TQ-Group
- Fix YouYeeToo prefix capitalization

Localization:
- Add verifyingSha translation key to all 15 locales
- Remove unused home.images key from all locales

Documentation:
- Update README to mention SHA256 verification
2025-12-19 22:49:01 +01:00
SuperKali
3389e7fbd2 Add Tauri auto-update functionality with in-app download
- Add tauri-plugin-updater and tauri-plugin-process dependencies
- Configure updater endpoint for GitHub Releases
- Rewrite UpdateModal with download progress and changelog display
- Add update-related i18n translations (15 languages)
- Configure createUpdaterArtifacts for .sig file generation
- Update workflow to use correct bundle types for each platform
2025-12-19 14:58:16 +01:00
SuperKali
2407ad9127 Revert "Add Tauri auto-update functionality with in-app download"
This reverts commit c5c4d68836.
2025-12-19 14:57:57 +01:00
SuperKali
c5c4d68836 Add Tauri auto-update functionality with in-app download
- Integrate tauri-plugin-updater and tauri-plugin-process
- Rewrite UpdateModal with download progress and changelog display
- Add update manifest generation to CI workflow
- Update i18n translations for all 15 languages
- Configure Ed25519 signature verification for secure updates
2025-12-19 14:41:22 +01:00
SuperKali
7ace643ea4 Fix ESLint errors and use static liblzma linking
- Add src-tauri/target to ESLint ignore list
- Fix React hooks lint warnings with eslint-disable comments
- Replace xz2 with liblzma using static feature to fix macOS
  code signature mismatch when using ad-hoc signing
2025-12-15 09:50:37 +01:00
SuperKali
374b74d7f0 Windows: fix TaskDialogIndirect missing entry point error
Add Microsoft.Windows.Common-Controls v6.0 dependency to app.manifest
to enable modern dialog APIs required by tauri-plugin-dialog.
Also add Windows 7/8/8.1/10/11 compatibility declarations.
2025-12-14 09:47:29 +01:00
SuperKali
5ebad94e8b Add i18n support with 14 languages and auto system locale detection
- Add i18next and react-i18next for internationalization
- Add sys-locale Rust crate for cross-platform locale detection
- Add Tauri command get_system_locale for backend locale detection
- Create translation files for 14 languages:
  EN, IT, DE, FR, ES, PT, NL, PL, RU, ZH, JA, KO, UK, TR
- Update all UI components to use translations
- Update README with new features and 307+ boards count
2025-12-14 09:37:56 +01:00
SuperKali
4fb35252a0 Windows: request admin privileges at startup, optimize disk scan 2025-12-14 08:19:58 +01:00
SuperKali
a8c2a5ca00 Linux: improve device type detection for USB/SD badges
- Use lsblk TRAN field for reliable transport type detection
- Check sysfs path for /usb, /mmc_host/, /ata patterns
- Map MMC transport to SD for proper badge display
2025-12-14 00:27:31 +01:00
SuperKali
b6daf933b1 Linux: use UDisks2 for privilege escalation, remove image cache
- Use UDisks2 D-Bus API for privilege escalation via polkit
- App runs as normal user, asks for password only when flashing
- Remove board image cache - load images directly from CDN
- Add periodic fdatasync during write for accurate progress bar
- Invalidate page cache before verification with posix_fadvise
- Remove pkexec wrapper and custom Linux packaging config
2025-12-14 00:09:29 +01:00
SuperKali
7745b9c53e Use rustls-tls for better Linux compatibility 2025-12-13 19:50:34 +01:00
SuperKali
601db2c988 Add device disconnect detection on homepage 2025-12-13 18:54:18 +01:00
SuperKali
69b102e985 Suppress unused import warning for Manager trait 2025-12-13 18:31:08 +01:00
SuperKali
b2c08c7f31 Add device type detection with bus_type for accurate SD/USB icons
- Add bus_type field to BlockDevice struct for reliable device classification
- Windows: Extract BusType from PowerShell Get-Disk (USB, SD, SATA, NVMe)
- Linux: Detect from path (mmcblk, nvme) and sysfs for USB/SATA
- macOS: Parse Protocol field from diskutil (Secure Digital, USB, etc.)
- Frontend: Use bus_type as primary source, fallback to model/path heuristics
- Add device type icons: MemoryStick for SD, Usb for USB, Shield for system
- Add colored badges for device types (SD Card, USB, System)
- Auto-refresh device list every 2s with smart change detection
- Only log device changes (added/removed) to reduce log spam
2025-12-13 18:18:18 +01:00
SuperKali
7f9732b656 Add error logging and paste.armbian.com log upload
- Add ErrorDisplay component with QR code for log sharing
- Integrate error display in all modals (BoardModal, ImageModal, DeviceModal, ManufacturerModal)
- Add upload_logs command to paste logs to paste.armbian.com
- Add comprehensive logging across all Rust modules:
  - Startup info (version, OS, arch, config URLs)
  - Board/image queries with cache status
  - Device scanning on all platforms
  - Download, flash, and authorization operations
  - Custom image handling and decompression
- Fix log level alignment (remove extra space from INFO/WARN)
2025-12-13 17:55:53 +01:00
SuperKali
ac7a6ec0e1 Improve board selection UI with grid layout and badges
- Add grid layout for board cards with images on top, names below
- Add image count badge with download icon in top-right corner
- Replace star icon with 'Recommended' badge for promoted boards
- Fix search bar to stay fixed when scrolling (moved outside scroll area)
- Add border to modal header for visual separation
- Clean up orphan CSS and remove unused board-icon class
- Reduce icon sizes in DeviceModal for consistency
2025-12-13 16:32:53 +01:00