feat(infrared): add infrared control, learning, and virtual remote module #9

Merged
KremeCN merged 41 commits from feat/moler-infrared-control into main 2026-08-25 14:51:34 +08:00
8 changed files with 8 additions and 8 deletions
Showing only changes of commit 2cc70b0ca3 - Show all commits
@@ -17,7 +17,7 @@ data class InfraredHubUiState(
val profileId: ProviderProfileId? = null,
val providerType: ProviderType? = null,
val providerDisplayName: String? = null,
val savedDeviceName: DeviceName = DeviceName("ir-1"),
val savedDeviceName: DeviceName = DeviceName("红外控制器"),
val remotes: List<VirtualRemote> = emptyList(),
val slotQuota: SlotQuotaSummary = SlotQuotaSummary(),
val loading: Boolean = true,
@@ -195,6 +195,6 @@ class InfraredHubViewModel @Inject constructor(
}
companion object {
val DEFAULT_DEVICE_NAME = DeviceName("ir-1")
val DEFAULT_DEVICE_NAME = DeviceName("红外控制器")
}
}
@@ -326,6 +326,6 @@ class InfraredRemoteViewModel @Inject constructor(
}
companion object {
val DEFAULT_DEVICE_NAME = DeviceName("ir-1")
val DEFAULT_DEVICE_NAME = DeviceName("红外控制器")
}
}
@@ -210,7 +210,7 @@ internal fun InfraredControlScreen(
OutlinedTextField(
value = state.deviceNameInput,
onValueChange = onDeviceNameChanged,
label = { Text("修改设备名(如:ir-1, ir-living)") },
label = { Text("修改设备名(如:红外控制器)") },
singleLine = true,
modifier = Modifier
.weight(1f)
@@ -17,7 +17,7 @@ data class InfraredControlUiState(
val providerType: ProviderType? = null,
val providerDisplayName: String? = null,
val deviceNameInput: String = "",
val savedDeviceName: DeviceName = DeviceName("ir-1"),
val savedDeviceName: DeviceName = DeviceName("红外控制器"),
val slotQuota: SlotQuotaSummary = SlotQuotaSummary(),
val totalRemotesCount: Int = 0,
val loading: Boolean = true,
@@ -179,6 +179,6 @@ class InfraredControlViewModel @Inject constructor(
}
companion object {
val DEFAULT_DEVICE_NAME = DeviceName("ir-1")
val DEFAULT_DEVICE_NAME = DeviceName("红外控制器")
}
}
@@ -77,7 +77,7 @@
<string name="infrared_key_tv_back">电视-返回</string>
<string name="infrared_control_title">红外设备与环境配置</string>
<string name="infrared_device_config_section">ABSDK 设备名称配置</string>
<string name="infrared_device_config_desc">ABSDK 依靠此设备名称(如 ir-1、ir-living)寻址具体的硬件转发器,请确保名称与主机端保持一致。</string>
<string name="infrared_device_config_desc">ABSDK 依靠此设备名称(默认为 红外控制器)寻址具体的硬件转发器,请确保名称与主机端保持一致。</string>
<string name="infrared_device_name_current">当前绑定设备:%1$s</string>
<string name="infrared_device_save_changes">保存修改</string>
<string name="infrared_device_stats_section">硬件槽位与遥控器概览</string>
@@ -79,7 +79,7 @@
<string name="infrared_key_tv_menu">TV Menu</string>
<string name="infrared_control_title">Device Configuration</string>
<string name="infrared_device_config_section">ABSDK Device Name</string>
<string name="infrared_device_config_desc">ABSDK matches hardware devices by device name (e.g. ir-1, ir-living). Commands will be dispatched to this target device.</string>
<string name="infrared_device_config_desc">ABSDK matches hardware devices by device name (default: 红外控制器). Commands will be dispatched to this target device.</string>
<string name="infrared_device_name_current">Current Bound Device: %1$s</string>
<string name="infrared_device_save_changes">Save Changes</string>
<string name="infrared_device_stats_section">Hardware Slot Budget</string>