feat: implement client backend

This includes temporary AI-generated frontend scaffolding, none of this will be used in production. It was just used during development for the backend.
This commit is contained in:
2026-10-09 19:46:02 +01:00
parent 88a64768a2
commit 5eb47e45ef
49 changed files with 3576 additions and 17 deletions
+70
View File
@@ -0,0 +1,70 @@
/// TEMPORARY AI GENERATED FRONTEND \\\
/// NOT TO BE USED IN PRODUCTION \\\
// Data shapes shared between Rust and Slint. Rust fills models of these; the UI
// only renders them. Keep them flat and dumb.
export enum Screen { loading, login, main }
export enum ChannelKind { text, voice, category }
export enum MessageKind { message, date-divider, notice, start-of-room }
// A Discord "server" == a top-level Matrix Space.
export struct ServerItem {
id: string,
name: string,
initial: string,
color: color,
unread: bool,
mentions: int,
}
// A Discord "channel" == a Matrix room. A "category" == a sub-space.
// In Home mode the same struct carries DMs (is-dm = true).
export struct ChannelItem {
id: string,
name: string,
topic: string,
kind: ChannelKind,
unread: bool,
mentions: int,
joined: bool,
is-dm: bool,
initial: string,
color: color,
}
export struct ReactionItem {
key: string,
count: int,
mine: bool,
}
// One row of the message list. Date dividers, notices and the "start of room"
// banner are rows too, so the list is a single flat model.
export struct MessageItem {
id: string,
kind: MessageKind,
sender: string,
initial: string,
color: color,
body: string,
time: string,
short-time: string,
show-header: bool,
edited: bool,
own: bool,
pending: bool,
has-reply: bool,
reply-sender: string,
reply-body: string,
reactions: [ReactionItem],
}
// Member list rows. Header rows ("ADMINS — 2") are rows too.
export struct MemberItem {
id: string,
name: string,
initial: string,
color: color,
is-header: bool,
}