diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-22 17:37:13 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-22 17:37:13 -0800 |
| commit | 4ddc0699afedae39fa27e134bec05330426f2120 (patch) | |
| tree | ce0936e7c537ef527c6472b746b8ef16e471c912 /Hotline/iOS/ChatView.swift | |
| parent | 3d26737cccd57fcbb5289874363f030ecef77573 (diff) | |
Some work to get banner images working. Some plumbing to get file transfers working though they don't yet. Moving some code away from async/await.
Diffstat (limited to 'Hotline/iOS/ChatView.swift')
| -rw-r--r-- | Hotline/iOS/ChatView.swift | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Hotline/iOS/ChatView.swift b/Hotline/iOS/ChatView.swift index 08b6a75..e56f3f1 100644 --- a/Hotline/iOS/ChatView.swift +++ b/Hotline/iOS/ChatView.swift @@ -24,14 +24,28 @@ struct ChatView: View { LazyVStack(alignment: .leading) { ForEach(model.chat) { msg in if msg.type == .agreement { - VStack(alignment: .leading) { - Text(msg.text) - .textSelection(.enabled) - .padding() - .opacity(0.75) + + VStack(alignment: .center) { + FileImageView() + .environment(self.model) + .frame(maxWidth: 468.0) + .clipShape(RoundedRectangle(cornerRadius: 5)) + + VStack(alignment: .leading) { + HStack { + Text(msg.text) + .textSelection(.enabled) + .font(.system(size: 12)) + .fontDesign(.monospaced) + .lineSpacing(2) + .padding() + Spacer() + } + } + .background(colorScheme == .dark ? Color(white: 0.1) : Color(white: 0.96)) + .frame(maxWidth: .infinity) + .cornerRadius(5) } - .background(colorScheme == .dark ? Color(white: 0.1) : Color(white: 0.96)) - .cornerRadius(16) .frame(maxWidth: .infinity) .padding() } |