aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/MessageBoardView.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-02-05 22:27:17 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-02-05 22:27:17 +0100
commit45829daa856b376b1ab04d415917110b71b1dec5 (patch)
tree8e52daed6897b6f489d455736fe256cb9bd90fef /Hotline/macOS/MessageBoardView.swift
parent5c3ea897d062a47bc8cd6255fb8c36bad2f0733f (diff)
Apply formatting
Diffstat (limited to 'Hotline/macOS/MessageBoardView.swift')
-rw-r--r--Hotline/macOS/MessageBoardView.swift63
1 files changed, 31 insertions, 32 deletions
diff --git a/Hotline/macOS/MessageBoardView.swift b/Hotline/macOS/MessageBoardView.swift
index f870b0c..115e4e3 100644
--- a/Hotline/macOS/MessageBoardView.swift
+++ b/Hotline/macOS/MessageBoardView.swift
@@ -2,10 +2,10 @@ import SwiftUI
struct MessageBoardView: View {
@Environment(Hotline.self) private var model: Hotline
-
+
@State private var composerDisplayed: Bool = false
@State private var composerText: String = ""
-
+
var body: some View {
NavigationStack {
if model.access?.contains(.canReadMessageBoard) != false {
@@ -38,8 +38,7 @@ struct MessageBoardView: View {
}
}
.background(Color(nsColor: .textBackgroundColor))
- }
- else {
+ } else {
ZStack(alignment: .center) {
Text("No Message Board")
.font(.title)
@@ -54,36 +53,36 @@ struct MessageBoardView: View {
MessageBoardEditorView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.frame(idealWidth: 450, idealHeight: 350)
-// RichTextEditor(text: $composerText)
-// .richEditorFont(NSFont.systemFont(ofSize: 16.0))
-// .richEditorAutomaticDashSubstitution(false)
-// .richEditorAutomaticQuoteSubstitution(false)
-// .richEditorAutomaticSpellingCorrection(false)
-// .background(Color(nsColor: .textBackgroundColor))
-// .frame(maxWidth: .infinity, maxHeight: .infinity)
-// .frame(idealWidth: 450, idealHeight: 350)
-// .toolbar {
-// ToolbarItem(placement: .cancellationAction) {
-// Button("Cancel") {
-// composerDisplayed.toggle()
-// }
-// }
-//
-// ToolbarItem(placement: .primaryAction) {
-// Button("Post") {
-// composerDisplayed.toggle()
-// let text = composerText
-// composerText = ""
-// model.postToMessageBoard(text: text)
-// Task {
-// await model.getMessageBoard()
-// }
-// }
-// }
-// }
+ // RichTextEditor(text: $composerText)
+ // .richEditorFont(NSFont.systemFont(ofSize: 16.0))
+ // .richEditorAutomaticDashSubstitution(false)
+ // .richEditorAutomaticQuoteSubstitution(false)
+ // .richEditorAutomaticSpellingCorrection(false)
+ // .background(Color(nsColor: .textBackgroundColor))
+ // .frame(maxWidth: .infinity, maxHeight: .infinity)
+ // .frame(idealWidth: 450, idealHeight: 350)
+ // .toolbar {
+ // ToolbarItem(placement: .cancellationAction) {
+ // Button("Cancel") {
+ // composerDisplayed.toggle()
+ // }
+ // }
+ //
+ // ToolbarItem(placement: .primaryAction) {
+ // Button("Post") {
+ // composerDisplayed.toggle()
+ // let text = composerText
+ // composerText = ""
+ // model.postToMessageBoard(text: text)
+ // Task {
+ // await model.getMessageBoard()
+ // }
+ // }
+ // }
+ // }
}
.toolbar {
- ToolbarItem(placement:.primaryAction) {
+ ToolbarItem(placement: .primaryAction) {
Button {
composerDisplayed.toggle()
} label: {