ui: ClinicalHome BLE 카드에 Disconnect + Unpair 두 버튼
기존엔 Unpair (완전 해제) 만 있었음. 데모 중 다른 디바이스로 빠르게 스위치하려면 bond 유지 채 소프트 끊기가 필요 — 일반 설정 탭의 Disconnect / Delete Pairing 분리와 동일 정책. 레이아웃: 우측 Column 으로 위에 Disconnect(회색), 아래 Unpair(빨강) 세로 배치. 32dp 슬림 버튼. - Disconnect: bleManager.disconnect() + isDeviceConnected=false (bond/known list 유지, PIN 없이 빠른 재연결) - Unpair: 기존 확인 다이얼로그 → disconnectAndUnbond
This commit is contained in:
+18
-4
@@ -162,10 +162,24 @@ fun ClinicalHomeView(appState: AppState) {
|
|||||||
fontWeight = FontWeight.SemiBold)
|
fontWeight = FontWeight.SemiBold)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OutlinedButton(
|
Column(horizontalAlignment = Alignment.End) {
|
||||||
onClick = { showUnpairConfirm = true },
|
OutlinedButton(
|
||||||
colors = ButtonDefaults.outlinedButtonColors(contentColor = Color(0xFFE53935))
|
onClick = {
|
||||||
) { Text("Unpair", fontSize = 12.sp) }
|
bleManager.disconnect()
|
||||||
|
appState.isDeviceConnected = false
|
||||||
|
},
|
||||||
|
colors = ButtonDefaults.outlinedButtonColors(contentColor = Color(0xFF555555)),
|
||||||
|
contentPadding = androidx.compose.foundation.layout.PaddingValues(horizontal = 12.dp, vertical = 0.dp),
|
||||||
|
modifier = Modifier.height(32.dp)
|
||||||
|
) { Text("Disconnect", fontSize = 11.sp) }
|
||||||
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
|
OutlinedButton(
|
||||||
|
onClick = { showUnpairConfirm = true },
|
||||||
|
colors = ButtonDefaults.outlinedButtonColors(contentColor = Color(0xFFE53935)),
|
||||||
|
contentPadding = androidx.compose.foundation.layout.PaddingValues(horizontal = 12.dp, vertical = 0.dp),
|
||||||
|
modifier = Modifier.height(32.dp)
|
||||||
|
) { Text("Unpair", fontSize = 11.sp) }
|
||||||
|
}
|
||||||
} else if (showConnecting) {
|
} else if (showConnecting) {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
modifier = Modifier.size(20.dp),
|
modifier = Modifier.size(20.dp),
|
||||||
|
|||||||
Reference in New Issue
Block a user