Files
andros a31bc807cb Initial iOS port of meshmonitor-chat.el
SwiftUI app for the MeshMonitor REST API: setup screen with token
storage in Keychain, welcome dashboard mirroring the Emacs welcome
buffer, and channel/node/DM/unread lists with a shared chat view
supporting both channel and direct messages.
2026-04-14 15:30:21 +02:00

21 lines
391 B
Swift

import Foundation
enum ChatTarget: Hashable {
case channel(Int, name: String)
case dm(nodeId: String, name: String)
var title: String {
switch self {
case .channel(_, let name): return "#\(name)"
case .dm(_, let name): return name
}
}
var navigationKey: String {
switch self {
case .channel(let id, _): return "ch-\(id)"
case .dm(let id, _): return "dm-\(id)"
}
}
}