Header: collapse button folds the island (and chat size) back into the notch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 22:29:48 +03:00
parent ae394370bf
commit 3857776111
@@ -556,6 +556,21 @@ struct IslandHeader: View {
// here they ran under the camera.
#endif
HStack(spacing: 14) {
// Fold everything back into the notch (and the chat to its normal size).
Button(action: {
state.chatDragHeight = nil
state.chatDetent = 0
NotificationCenter.default.post(name: .islandCollapse, object: nil)
}) {
Image(systemName: "chevron.up")
.font(.system(size: 13, weight: .semibold))
.foregroundColor(Color(hex: "#8E939C"))
.frame(width: 22, height: 22)
.background(Circle().fill(Color.white.opacity(state.chatDetent > 0 && state.view == .prompt ? 0.10 : 0)))
}
.buttonStyle(.plain)
.help("Свернуть в чёлку")
Button(action: {
withAnimation(.spring(response: 0.3, dampingFraction: 0.8)) {
state.view = .settings