Meta and refactor

This commit is contained in:
2026-08-20 11:06:35 +02:00
parent 8bdae4ceb8
commit 9c448049bc
6 changed files with 50 additions and 37 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { invoke } from "@tauri-apps/api/core";
import { ClientMeta } from "./types";
export interface Account {
displayName: string;
avatar?: string;
meta: ClientMeta;
privateKey: string;
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { ServerMeta } from "@/app/protocol";
import { invoke } from "@tauri-apps/api/core";
import { ServerMeta } from "./types";
export interface KnownServer {
meta: ServerMeta;
+26
View File
@@ -0,0 +1,26 @@
export interface ClientMeta {
displayName: string;
avatar?: string;
}
export interface ServerMeta {
name: string;
description: string;
channels: Channel[];
}
export interface MessageData {
content: string;
timestamp: number;
signature: string;
}
export interface StoredMessage extends MessageData {
id: string;
author: string;
}
export type Channel = { id: string; name: string } & ChannelKind;
export type ChannelKind =
{ kind: "text" } | { kind: "category"; channels: Channel[] };