chore: added menu
e733a0eb
1 file(s) · +16 −2
| 26 | 26 | } |
|
| 27 | 27 | ||
| 28 | 28 | struct ContentView: View { |
|
| 29 | - | @State private var urlText = "gemini://geminiprotocol.net/" |
|
| 29 | + | private let homeSite = "gemini://geminiprotocol.net/" |
|
| 30 | + | ||
| 31 | + | @State private var urlText = "" |
|
| 30 | 32 | @State private var responseText = "" |
|
| 31 | 33 | @State private var isLoading = false |
|
| 32 | 34 | ||
| 105 | 107 | .onSubmit { |
|
| 106 | 108 | navigateTo(urlText) |
|
| 107 | 109 | } |
|
| 110 | + | ||
| 111 | + | Menu { |
|
| 112 | + | Button { |
|
| 113 | + | navigateTo(homeSite) |
|
| 114 | + | } label: { |
|
| 115 | + | Label("Home", systemImage: "house") |
|
| 116 | + | } |
|
| 117 | + | } label: { |
|
| 118 | + | Image(systemName: "ellipsis.circle") |
|
| 119 | + | .font(.title2) |
|
| 120 | + | .foregroundColor(.orange) |
|
| 121 | + | } |
|
| 108 | 122 | } |
|
| 109 | 123 | .padding(.top, 8) |
|
| 110 | 124 | } |
|
| 112 | 126 | .padding(.bottom, 8) |
|
| 113 | 127 | } |
|
| 114 | 128 | .onAppear { |
|
| 115 | - | navigateTo(urlText) |
|
| 129 | + | navigateTo(homeSite) |
|
| 116 | 130 | } |
|
| 117 | 131 | .ignoresSafeArea(edges: .top) |
|
| 118 | 132 | .alert("Input Required", isPresented: $showInputPrompt) { |
|