quintodrome/ui/src/utils
Deluan Quintão 6880cffd16
feat(ui): add scan progress and error reporting to UI (#4094)
* feat(scanner): add LastScanError tracking to scanner status

- Introduced LastScanErrorKey constant for error tracking.
- Updated StatusInfo struct to include LastError field.
- Modified scanner logic to store and retrieve last scan error.
- Enhanced ScanStatus response to include error information.
- Updated UI components to display last scan error when applicable.
- Added tests to verify last scan error functionality.

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(scanner): enhance scan status with type and elapsed time tracking

- Added LastScanTypeKey and LastScanStartTimeKey constants for tracking scan type and start time.
- Updated StatusInfo struct to include ScanType and ElapsedTime fields.
- Implemented getScanInfo method to retrieve scan type, elapsed time, and last error.
- Modified scanner logic to store scan type and start time during scans.
- Enhanced ScanStatus response and UI components to display scan type and elapsed time.
- Added formatShortDuration utility for better elapsed time representation.
- Updated activity reducer to handle new scan status fields.

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(tests): consolidate controller status tests into a single file

- Removed the old controller_status_test.go file.
- Merged relevant tests into the new controller_test.go file for better organization and maintainability.
- Ensured all existing test cases for controller status are preserved and functional.

Signed-off-by: Deluan <deluan@navidrome.org>

* Fix formatting issues

* refactor(scanner): update getScanInfo method documentation

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2025-05-21 09:30:23 -04:00
..
calculateReplayGain.js fix(ui): show effective dB of track when playing (#3293) 2024-09-21 16:46:14 -04:00
formatters.js feat(ui): add scan progress and error reporting to UI (#4094) 2025-05-21 09:30:23 -04:00
formatters.test.js feat(ui): add scan progress and error reporting to UI (#4094) 2025-05-21 09:30:23 -04:00
index.js Refactor URL builders in UI 2023-01-24 18:36:45 -05:00
intersperse.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00
notifications.js Fix formatting 2020-11-21 02:03:54 -05:00
openInNewTab.js Implement Last.fm account linking UI 2021-06-23 11:01:58 -04:00
removeHomeCache.js fix(ui): remove index.html from service worker cache after creating admin user (#3642) 2025-01-12 18:32:02 -05:00
urls.js Make the UI use the new ShareURL option 2024-09-15 17:26:58 -04:00
validations.js Simplify radio CRUD code 2023-01-25 10:03:55 -05:00