diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-08 20:53:10 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-08 20:53:10 -0700 |
| commit | 75b40db9adac93dde9df3ff76bb172c76e3d3a55 (patch) | |
| tree | 1e9088849d7a32ac0f42c933e2b6ab50350ed196 /Hotline/macOS/ChatView.swift | |
| parent | 01d32910bc1e75533c2f473011296fee6febbadb (diff) | |
Fix about box layout on open. Remove about box from window menu, add expand button to server agreement, add email address highlighting, style server messages, unread badge on admins are red now, play server message sound, some code cleanup.
Diffstat (limited to 'Hotline/macOS/ChatView.swift')
| -rw-r--r-- | Hotline/macOS/ChatView.swift | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/Hotline/macOS/ChatView.swift b/Hotline/macOS/ChatView.swift index 98fb852..0875106 100644 --- a/Hotline/macOS/ChatView.swift +++ b/Hotline/macOS/ChatView.swift @@ -44,35 +44,17 @@ struct ChatView: View { .clipShape(RoundedRectangle(cornerRadius: 3)) } #endif - ScrollView(.vertical) { - HStack { - Spacer() - Text(msg.text.convertToAttributedStringWithLinks()) - .font(.system(size: 12)) - .fontDesign(.monospaced) - .textSelection(.enabled) - .tint(Color("Link Color")) - .frame(maxWidth: 400, alignment: .center) - .padding(16) - Spacer() - } - } - .frame(maxWidth: .infinity, maxHeight: 375) - .scrollBounceBehavior(.basedOnSize) -#if os(iOS) - .background(Color("Agreement Background")) -#elseif os(macOS) - .background(VisualEffectView(material: .titlebar, blendingMode: .withinWindow)) -#endif - .clipShape(RoundedRectangle(cornerRadius: 8)) - .padding(.bottom, 16) + ServerAgreementView(text: msg.text) + .padding(.bottom, 16) } // MARK: Server Message else if msg.type == .server { - Text(msg.text) - .lineSpacing(4) - .multilineTextAlignment(.leading) - .textSelection(.enabled) + HStack { + Spacer() + ServerMessageView(message: msg.text) + Spacer() + } + .padding(EdgeInsets(top: 2, leading: 0, bottom: 2, trailing: 0)) } // MARK: Status else if msg.type == .status { |