Commit Graph

153 Commits

Author SHA1 Message Date
lollipopkit🏳️‍⚧️
56e67f4725 fix: sync will refresh the entire app (#877) 2025-09-01 01:18:06 +08:00
lollipopkit🏳️‍⚧️
3b7fdf36fb opt. 2025-08-31 23:59:53 +08:00
lollipopkit🏳️‍⚧️
53a7c0d8ff migrate: riverpod + freezed (#870) 2025-08-31 00:55:54 +08:00
dsvf
4a7827f41a Delay bio auth (#642) 2025-08-17 14:06:24 +08:00
lollipopkit🏳️‍⚧️
3a615449e3 feat: Windows compatibility (#836)
* feat: win compatibility

* fix

* fix: uptime parse

* opt.: linux uptime accuracy

* fix: windows temperature fetching

* opt.

* opt.: powershell exec

* refactor: address PR review feedback and improve code quality

### Major Improvements:
- **Refactored Windows status parsing**: Broke down large `_getWindowsStatus` method into 13 smaller, focused helper methods for better maintainability and readability
- **Extracted system detection logic**: Created dedicated `SystemDetector` helper class to separate OS detection concerns from ServerProvider
- **Improved concurrency handling**: Implemented proper synchronization for server updates using Future-based locks to prevent race conditions

### Bug Fixes:
- **Fixed CPU percentage parsing**: Removed incorrect '*100' multiplication in BSD CPU parsing (values were already percentages)
- **Enhanced memory parsing**: Added validation and error handling to BSD memory fallback parsing with proper logging
- **Improved uptime parsing**: Added support for multiple Windows date formats and robust error handling with validation
- **Fixed division by zero**: Added safety checks in Swap.usedPercent getter

### Code Quality Enhancements:
- **Added comprehensive documentation**: Documented Windows CPU counter limitations and approach
- **Strengthened error handling**: Added detailed logging and validation throughout parsing methods
- **Improved robustness**: Enhanced BSD CPU parsing with percentage validation and warnings
- **Better separation of concerns**: Each parsing method now has single responsibility

### Files Changed:
- `lib/data/helper/system_detector.dart` (new): System detection helper
- `lib/data/model/server/cpu.dart`: Fixed percentage parsing and added validation
- `lib/data/model/server/memory.dart`: Enhanced fallback parsing and division-by-zero protection
- `lib/data/model/server/server_status_update_req.dart`: Refactored into 13 focused parsing methods
- `lib/data/provider/server.dart`: Improved synchronization and extracted system detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: parse & shell fn struct

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-08 16:56:36 +08:00
lollipopkit🏳️‍⚧️
79c515c903 new: bio_auth -> local_auth (#776)
Fixes #722
2025-06-05 09:07:28 +08:00
lollipopkit🏳️‍⚧️
8627ff823f optimization: desktop UI (#747) 2025-05-13 04:57:37 +08:00
lollipopkit
aed5a63a19 opt.: only req noti perm on Android 2024-04-08 20:13:00 +08:00
lollipopkit
2f96a090c4 new: auto request noti perm 2024-04-03 11:27:06 +08:00
lollipopkit
3ad1e7a196 new: customCmds tips 2024-03-30 17:34:02 +08:00
lollipopkit
dacc042a85 fix: repeatedly auth (#294 #320) 2024-03-28 11:48:01 +08:00
lollipopkit
bfece9ae7d opt.: ssh tab top padding 2024-03-25 16:41:34 +08:00
lollipopkit
2681e4eb28 opt. & fix
- fix: pve text color
- opt.: rm ssh tab appbar
- opt.: ssh tab only display fab on `Add` page
2024-03-22 22:52:31 +08:00
lollipopkit
7feebb8c1f try: fix repeated auth (#294) 2024-03-21 17:24:07 +08:00
lollipopkit
96a0b9cfd2 opt.: use cdn as default 2024-03-09 17:43:15 +08:00
lollipopkit
b9aa4ba124 new: useCDN option 2024-03-08 15:52:02 +08:00
lollipopkit
17c50000db new: use foreground service to keep ssh conn (#265) 2024-02-01 17:30:21 +08:00
lollipopkit
799a1ac5f0 opt.: reconnect logic (#258) 2024-01-28 14:53:48 +08:00
lollipopkit
1434556e0b new: iperf 2024-01-21 18:53:17 +08:00
lollipopkit
7156f08eb8 new: control server detail page cards 2024-01-19 17:32:03 +08:00
lollipopkit
11dca4c37c fix: restore logic 2024-01-14 18:50:25 +08:00
lollipopkit
b442e0f914 new: setting of default collapse 2024-01-05 21:58:43 +08:00
lollipopkit
5284ceefd6 opt. 2023-12-27 11:44:45 +08:00
lollipopkit
4a93b326db new: more battery data & fix: auto reload 2023-12-20 17:26:04 +08:00
lollipopkit
2b1b6c7afb new & opt.: server page font size 2023-12-19 14:27:59 +08:00
lollipopkit
ee18b85108 opt.: tag switcher 2023-12-15 12:01:55 +08:00
lollipopkit
ce9929e93f opt. 2023-12-11 11:13:49 +08:00
lollipopkit
73752bffc3 opt.: backup & titlebar 2023-12-09 18:48:22 +08:00
lollipopkit
8a3fd342c6 opt.: upgrade linter & fix lint issues 2023-12-06 11:09:05 +08:00
lollipopkit
66d344c910 chore: screenshots 2023-12-03 13:16:51 +08:00
lollipopkit
d74819b198 new: add back ping 2023-11-22 20:18:46 +08:00
lollipopkit
790812901d new: ssh tab 2023-11-12 15:58:54 +08:00
lollipopkit
2133302397 new: delete scripts when delete server 2023-11-07 18:10:38 +08:00
lollipopkit
8ce2cc579c new: icloud manual 2023-10-17 20:03:55 +08:00
lollipopkit
153bfc191d opt.: sftp rename 2023-09-25 19:47:20 +08:00
lollipopkit
4d06a52e99 new & opt.
- new: support suspend and WOL #172
- opt.: `execWithPwd` when cancel
- opt.: extentions
2023-09-25 18:51:14 +08:00
lollipopkit
7bbaa5f5ab fix: auto reload after restoring 2023-09-24 15:53:53 +08:00
lollipopkit
e928a29353 opt.: no app restart required 2023-09-21 20:08:54 +08:00
lollipopkit
603e226995 tidy: settings page 2023-09-17 14:30:34 +08:00
lollipopkit
f51934396f new: watchOS phone end 2023-09-16 18:45:11 +08:00
lollipopkit
8152829c89 #165 new: bio auth 2023-09-16 17:26:40 +08:00
lollipopkit
2e8761f533 opt.: divide platform 2023-09-16 17:06:47 +08:00
lollipopkit
2a6c2f7c72 opt.: method channels 2023-09-16 16:56:11 +08:00
lollipopkit
c07958fa73 new: Providers 2023-09-14 15:13:11 +08:00
lollipopkit
eb158e63a2 opt.: mem usage 2023-09-13 15:22:48 +08:00
lollipopkit
278d5984b2 opt. 2023-09-13 14:28:02 +08:00
lollipopkit
6c84d2f52b opt.: Loggers 2023-09-13 13:41:09 +08:00
lollipopkit
269c2a0a10 opt.: backup 2023-09-13 13:05:19 +08:00
lollipopkit
567f1442f5 #156 opt.: show error of settings json 2023-09-07 16:41:38 +08:00
lollipopkit
b417cca906 opt.: sftp rm -rf 2023-09-01 12:57:48 +08:00