Skip to content

Commit c6bf618

Browse files
committed
Add close button to debug view
1 parent 4f1cf2a commit c6bf618

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

TrackWeight/DebugView.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,29 @@ import SwiftUI
1010

1111
struct DebugView: View {
1212
@StateObject var viewModel = ContentViewModel()
13+
@Environment(\.dismiss) private var dismiss
1314

1415
var body: some View {
1516
VStack {
17+
// Header with close button
18+
HStack {
19+
Text("Debug Console")
20+
.font(.title2)
21+
.fontWeight(.semibold)
22+
23+
Spacer()
24+
25+
Button(action: {
26+
dismiss()
27+
}) {
28+
Image(systemName: "xmark.circle.fill")
29+
.font(.title2)
30+
.foregroundColor(.secondary)
31+
}
32+
.buttonStyle(PlainButtonStyle())
33+
.help("Close Debug Console")
34+
}
35+
.padding(.bottom)
1636

1737
// Device Selector
1838
if !viewModel.availableDevices.isEmpty {

0 commit comments

Comments
 (0)