feat: add socket control and temperature humidity modules (#7)
## Summary - **Smart Socket Module**: - Implemented `SocketUiState` and `SocketViewModel` with support for querying power state, toggle control, duplicate click debouncing, and state confirmation timestamping. - Implemented Material 3 responsive `SocketScreen` with power indicator badge, toggle action, explicit on/off buttons, offline banner, and error handling. - **Temperature & Humidity Module**: - Implemented `TemperatureHumidityUiState` and `TemperatureHumidityViewModel` for read-only environmental telemetry. - Implemented `TemperatureHumidityScreen` featuring distinct temperature and humidity cards, read-only notice, no-data placeholder, and pull-to-refresh actions. - **Common & Infrastructure**: - Added `UiText` and `DomainErrorMapper` for localizing domain errors (`DomainError`). - Added navigation graph extensions (`deviceDetailGraph`) in `DeviceDetailNavigation.kt` and wired into `ABoxManagerApp.kt`. - Added `ReleaseModule` for Hilt dependency injection in release builds. - Added full English and Simplified Chinese resource translations in `values/strings.xml` and `values-zh-rCN/strings.xml`. - **Testing**: - Added `SocketViewModelTest` and `TemperatureHumidityViewModelTest` covering normal operations, offline states, error mapping, and refresh scenarios. ## Test Plan - [x] Run `./gradlew test` (all modules passed) - [x] Run `./gradlew :android:app:testDebugUnitTest` (passed) - [x] Run `./gradlew assembleDebug` (build successful) ?? Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: KremeCN <3265494849@qq.com> Reviewed-on: #7 Co-authored-by: Aurum <aurum_197@outlook.com>
This commit was merged in pull request #7.
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
<string name="infrared_key_tv_ch_down">电视-频道-</string>
|
||||
<string name="infrared_key_tv_home">电视-主页</string>
|
||||
<string name="infrared_key_tv_back">电视-返回</string>
|
||||
<string name="infrared_key_tv_menu">电视-菜单</string>
|
||||
<string name="infrared_control_title">红外设备与环境配置</string>
|
||||
<string name="infrared_device_config_section">ABSDK 设备名称配置</string>
|
||||
<string name="infrared_device_config_desc">ABSDK 依靠此设备名称(默认为 红外控制器)寻址具体的硬件转发器,请确保名称与主机端保持一致。</string>
|
||||
|
||||
Reference in New Issue
Block a user