Replace commands section with security warning in app info

- Removed COMMANDS section from AppInfoView
- Added WARNING section about unaudited private message security
- Warning displayed at bottom with red styling for visibility
- Users advised not to use for critical situations until audit complete
This commit is contained in:
jack
2025-07-24 20:04:30 +02:00
parent 492f90edd5
commit f4e954b837
+17 -23
View File
@@ -18,7 +18,7 @@ struct AppInfoView: View {
// MARK: - Constants // MARK: - Constants
private enum Strings { private enum Strings {
static let appName = "bitchat/" static let appName = "bitchat"
static let tagline = "mesh sidegroupchat" static let tagline = "mesh sidegroupchat"
enum Features { enum Features {
@@ -49,18 +49,9 @@ struct AppInfoView: View {
] ]
} }
enum Commands { enum Warning {
static let title = "COMMANDS" static let title = "WARNING"
static let list = [ static let message = "private message security has not yet been fully audited. do not use for critical situations until this warning disappears."
"/m @name - send private message",
"/w - see who's online",
"/block @name - block a peer",
"/block - list blocked peers",
"/unblock @name - unblock a peer",
"/clear - clear current chat",
"/hug @name - send someone a hug",
"/slap @name - slap with a trout"
]
} }
} }
@@ -175,18 +166,21 @@ struct AppInfoView: View {
.foregroundColor(textColor) .foregroundColor(textColor)
} }
// Commands // Warning
VStack(alignment: .leading, spacing: 16) { VStack(alignment: .leading, spacing: 6) {
SectionHeader(Strings.Commands.title) SectionHeader(Strings.Warning.title)
.foregroundColor(Color.red)
VStack(alignment: .leading, spacing: 8) { Text(Strings.Warning.message)
ForEach(Strings.Commands.list, id: \.self) { command in .font(.system(size: 14, design: .monospaced))
Text(command) .foregroundColor(Color.red)
} .fixedSize(horizontal: false, vertical: true)
}
.font(.system(size: 14, design: .monospaced))
.foregroundColor(textColor)
} }
.padding(.top, 6)
.padding(.bottom, 16)
.padding(.horizontal)
.background(Color.red.opacity(0.1))
.cornerRadius(8)
.padding(.top) .padding(.top)
} }