7open type Fabulous.Avalonia.View
19 | Chat of pubkey: string * compose: string
20 | AddContact of pubkey: string
22 | EditProfile of displayName: string * bio: string * photo: byte[] option
32 | Online of token: string
36 | Identified of identity: Identity * conn: ConnStatus
38 [<RequireQualifiedAccess>]
40 | TextMessage of id: string * body: string
41 | DeliveryAck of ackIds: string list
42 | ProfileMessage of profile: Profile
46 Timestamp: DateTimeOffset
55 Contacts: Map<string, Contact>
57 Messages: Map<string, ChatMessage list>
60 Profile: Profile option
65 SafeAreaBottom: float }
72 | SetServerUrl of string
79 | PollResult of events: IncomingEvent list * status: string * cursor: int64
82 | StateLoaded of Identity option * Data option * Profile option
84 | PhotoPicked of byte[] option
87 | FlushResult of sent: bool
90 | KeyboardHeightChanged of float
91 | SafeAreaChanged of top: float * bottom: float
93 | QRScanned of string option
98 | CmdConnect of url: string * identity: Identity
99 | CmdEnqueue of recipientHex: string * envelope: Envelope
100 | CmdFlushOutbox of session: Session
101 | CmdPoll of session: Session * cursor: int64 * retries: int
102 | CmdCopyToClipboard of string
104 | CmdSaveIdentity of Identity
105 | CmdSaveData of Data
107 | CmdSaveProfile of Profile
108 | CmdSubscribeKeyboard
109 | CmdSubscribeSafeArea
112 // ── Shared Helpers ──
114 let hexToOb (hex: string) = Crypto.fromHex hex |> Phonemic.toOb
116 let truncKey (hex: string) =
118 let parts = ob.Split('-')
120 if parts.Length <= 4 then
123 $"{parts.[0]}-{parts.[1]}..{parts.[parts.Length - 2]}-{parts.[parts.Length - 1]}"
125 let contactName (contacts: Map<string, Contact>) (pk: string) =
126 match Map.tryFind pk contacts with
127 | Some c -> c.DisplayName
130 let messagesFor (pk: string) (messages: Map<string, ChatMessage list>) =
131 messages |> Map.tryFind pk |> Option.defaultValue []
133 let connStatusLabel =
136 | Identified(_, Offline) -> "OFFLINE"
137 | Identified(_, Connecting) -> "CONNECTING"
138 | Identified(_, Online _) -> "ONLINE"
142 let viewErrorBanner (error: string option) =
146 TextBlock(err).foreground(SolidColorBrush(Colors.Red)).fontSize (12.)
147 Button("Dismiss", DismissError)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list