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:
@@ -52,6 +52,7 @@ android {
|
||||
excludes += "/META-INF/DEPENDENCIES"
|
||||
excludes += "/META-INF/LICENSE*"
|
||||
excludes += "/META-INF/NOTICE*"
|
||||
excludes += "/META-INF/INDEX.LIST"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user