fix: Use latest dartssh2 and add a switch for temperature between celsius and millicelsius (#1095)

* refactor(sftp): Optimize file download logic and SSH command execution handling

Replace manual chunked downloads with a more concise `sftp.download` method
Consistently use `utf8.decode` to process SSH command output

Remove redundant code and comments, and simplify the logic

* chore: Update `dartssh2` submodule

* feat (Temperature Display): Added an option to switch between degrees Celsius and millicelsius

Allows users to switch temperature units in server settings, resolving the issue of incorrect temperature display on some devices

* chore: Add a participnt

* fix(sftp): Fixed a resource leak issue during file downloads and SSH command execution

Ensured that remote and local file handles are properly closed during file downloads to prevent resource leaks. Additionally, improved error handling during SSH command execution to ensure that all streams are either successfully completed or properly handled in the event of an error.
This commit is contained in:
GT610
2026-04-01 11:27:58 +08:00
committed by GitHub
parent 36851ef1c2
commit 3c592baf2c
36 changed files with 211 additions and 102 deletions

View File

@@ -606,6 +606,10 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get specifyDevTip => '例如网络流量统计默认是所有设备,你可以在这里指定特定的设备';
@override
String get tempIsCelsiusTip =>
'开启后温度值将被视为摄氏度而非毫摄氏度。仅在温度显示不正确时开启例如显示0.1°C而非58°C';
@override
String get speed => '速度';