Commit Graph

62 Commits

Author SHA1 Message Date
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🏳️‍⚧️
ec4bf3df24 opt.: sftp dl 2025-07-21 16:20:27 +08:00
lollipopkit🏳️‍⚧️
7127c960f7 opt.: server detail page columns 2025-06-04 17:29:03 +08:00
lollipopkit🏳️‍⚧️
9547d92ac5 migrate: flutter 3.32 2025-05-25 17:05:46 +08:00
lollipopkit🏳️‍⚧️
28e34e2183 opt.: editor lang parse 2025-05-14 16:19:26 +08:00
lollipopkit🏳️‍⚧️
8627ff823f optimization: desktop UI (#747) 2025-05-13 04:57:37 +08:00
lollipopkit🏳️‍⚧️
24d64b835d opt.: app bar
Fixes #727
2025-03-20 20:20:13 +08:00
lollipopkit🏳️‍⚧️
9e5babec76 opt.: close after saving (#684) 2025-01-29 15:10:50 +08:00
Noo6
0ae0241800 opt: window title bar (#672)
* opt: window title bar

* rm: `VirtualWindowFrame` on `SettingsPage`
2025-01-10 15:19:03 +08:00
lollipopkit🏳️‍⚧️
ddd32e82d4 opt.: migrate to new fl_lib (#649)
Fixes #648
2024-12-02 21:06:44 +08:00
fei1025
046f2c06d0 修复路径在windos下读取不到的问题 (#630)
* 修复路径在windos下读取不到的问题

* opt: `local.dart` fmt

---------

Co-authored-by: Noo6 <72285529+No06@users.noreply.github.com>
2024-11-14 14:42:15 +08:00
lollipopkit🏳️‍⚧️
47aedb2f2e fix: rename file 2024-09-22 16:06:09 +08:00
lollipopkit🏳️‍⚧️
eab06abcaf opt. 2024-09-21 23:12:15 +08:00
lollipopkit🏳️‍⚧️
c062c12a0e opt.: redesigned settings page (#587) 2024-09-21 22:37:42 +08:00
lollipopkit🏳️‍⚧️
7558b4806d opt.: TagSwitcher related 2024-08-16 19:09:54 +08:00
lollipopkit🏳️‍⚧️
38366a2ef3 refactors (#539) 2024-08-16 01:24:43 +08:00
lollipopkit🏳️‍⚧️
267b0b0a69 opt.: sftp home & back (#533) 2024-08-14 19:01:44 +08:00
lollipopkit🏳️‍⚧️
64676bc5cb chore: l10n 2024-08-04 13:05:29 +08:00
lollipopkit🏳️‍⚧️
e3c885483b opt.: use ssh term to decompress (#519) 2024-08-04 11:40:38 +08:00
lollipopkit🏳️‍⚧️
ea7c8caf14 bug: color seed setting not working (#516) 2024-08-03 23:17:18 +08:00
lollipopkit🏳️‍⚧️
9db04a60c2 opt.: l10n & fix: write script (#514) 2024-08-03 22:44:21 +08:00
lollipopkit🏳️‍⚧️
432d76f024 fix: builtin editor (#503) 2024-07-28 15:06:34 +08:00
lollipopkit🏳️‍⚧️
7a359588db opt.: input field suggestion 2024-07-22 22:03:56 +08:00
lollipopkit🏳️‍⚧️
d785209eb6 opt.: share on desktop (#405) 2024-06-22 22:50:17 +08:00
lollipopkit
336b11b808 chore: change dart pkg id 2024-06-11 22:06:29 +08:00
lollipopkit
ba4abcecfb opt. 2024-05-14 23:39:17 +08:00
lollipopkit
04dfede535 opt.: migrate fl_lib 2024-05-14 22:29:37 +08:00
lollipopkit
3237d9eb21 opt. & new: icons 2024-04-26 00:39:03 +08:00
lollipopkit
1434556e0b new: iperf 2024-01-21 18:53:17 +08:00
lollipopkit
50d6ed919b opt.: disk size (#252) 2024-01-21 18:01:11 +08:00
lollipopkit
ee96f2696e opt.: file view (#249) 2024-01-16 11:42:30 +08:00
lollipopkit
6924290626 opt. 2023-12-20 11:34:18 +08:00
lollipopkit
ee18b85108 opt.: tag switcher 2023-12-15 12:01:55 +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
5660c0e0db new: disk view option & chore: flutter 3.16 2023-11-19 13:15:12 +08:00
lollipopkit
6579190ae4 opt: Shares 2023-10-26 10:18:37 +08:00
lollipopkit
8ce2cc579c new: icloud manual 2023-10-17 20:03:55 +08:00
lollipopkit
da65babd56 opt. 2023-10-05 21:17:04 +08:00
lollipopkit
a23a284d1a new: picker & opt. rm -r 2023-10-05 19:51:24 +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
5a9fd74470 opt. 2023-09-23 10:54:42 +08:00
lollipopkit
e928a29353 opt.: no app restart required 2023-09-21 20:08:54 +08:00
lollipopkit
c07958fa73 new: Providers 2023-09-14 15:13:11 +08:00
lollipopkit
278d5984b2 opt. 2023-09-13 14:28:02 +08:00
lollipopkit
269c2a0a10 opt.: backup 2023-09-13 13:05:19 +08:00
lollipopkit
700322c603 fix: mark sftp mission as completed when dispose 2023-09-12 13:26:14 +08:00
lollipopkit
e4fd75ac5a #157 new: icloud sync 2023-09-11 19:20:29 +08:00
lollipopkit
2f4b522189 new: upgrade on macos 2023-08-30 17:06:24 +08:00