Commit 262d8327a0
Verified · cmc
Sources/OrgstarMobile/OrgstarMobileApp.swift +2 −13 · view
| @@ -243,19 +243,8 @@ struct RootView: View { | |||
| 243 | .sheet(item: Binding(get: { model.clockPrompts.pending }, set: { if $0 == nil { model.clockPrompts.answer(nil) } })) { pending in | 243 | .sheet(item: Binding(get: { model.clockPrompts.pending }, set: { if $0 == nil { model.clockPrompts.answer(nil) } })) { pending in |
| 244 | ClockPromptSheet(prompt: pending.prompt) { model.clockPrompts.answer($0) } | 244 | ClockPromptSheet(prompt: pending.prompt) { model.clockPrompts.answer($0) } |
| 245 | } | 245 | } |
| 246 | // Above the tab bar, clear of every screen's toolbar. | 246 | // At the top, where the keyboard can't hide it. |
| 247 | .overlay(alignment: .bottom) { | 247 | .message($message, edge: .top) |
| 248 | if let message { | ||
| 249 | Text(message).font(.callout).padding(.horizontal, 14).padding(.vertical, 8) | ||
| 250 | .background(.regularMaterial, in: Capsule()) | ||
| 251 | .padding(.bottom, 150) | ||
| 252 | .onTapGesture { self.message = nil } | ||
| 253 | .task(id: message) { | ||
| 254 | try? await Task.sleep(for: .seconds(4)) | ||
| 255 | if self.message == message { self.message = nil } | ||
| 256 | } | ||
| 257 | } | ||
| 258 | } | ||
| 259 | .sheet(isPresented: $showingClockReport) { ClockReportScreen(workspace: workspace) } | 248 | .sheet(isPresented: $showingClockReport) { ClockReportScreen(workspace: workspace) } |
| 260 | .onChange(of: model.openRequest) { | 249 | .onChange(of: model.openRequest) { |
| 261 | guard let route = model.openRequest else { return } | 250 | guard let route = model.openRequest else { return } |