From 480500a3e7cfe1e2aa8ff261ca6f9e522c3aaf4c Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Thu, 2 May 2024 11:52:55 -0700 Subject: Link highlighting in chat (with basic markdown support for bold, italtics, strikethrough, monospace/code). Remove some source files from iOS build. --- Hotline/macOS/MessageBoardView.swift | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Hotline/macOS/MessageBoardView.swift') diff --git a/Hotline/macOS/MessageBoardView.swift b/Hotline/macOS/MessageBoardView.swift index 27b4be7..660ca05 100644 --- a/Hotline/macOS/MessageBoardView.swift +++ b/Hotline/macOS/MessageBoardView.swift @@ -13,7 +13,8 @@ struct MessageBoardView: View { ScrollView { LazyVStack(alignment: .leading) { ForEach(model.messageBoard, id: \.self) { - Text($0) + Text(LocalizedStringKey($0.convertLinksToMarkdown())) + .tint(Color("Link Color")) .lineLimit(100) .lineSpacing(4) .padding() @@ -51,9 +52,6 @@ struct MessageBoardView: View { } .padding() } - - - } .sheet(isPresented: $composerDisplayed) { TextEditor(text: $composerText) @@ -82,11 +80,6 @@ struct MessageBoardView: View { } } } -// .alert("Hello", isPresented: $showPermissionAlert) { -// Button("OK") { -// showPermissionAlert.toggle() -// } -// } message: { Text("WHAT") } .toolbar { ToolbarItem(placement:.primaryAction) { Button { -- cgit