Phase 2: E2EE for DM + Slint migration + dead code cleanup
- E2EE crypto (src/e2ee.rs) with X25519 key derivation from Ed25519, HKDF shared secret, ChaCha20-Poly1305 encrypt/decrypt - E2EE net layer: PID 0x0071-0x0074, JSON payloads, dispatch, session handlers - E2EE UI: lock icons in DM header and sidebar - Slint migration: all .slint files, bridge.rs, update.rs, main.rs - Removed egui UI (~50 files), cleaned all dead code - Clean cargo clippy -- -D warnings
This commit is contained in:
parent
f361b037cb
commit
03d94e0465
83 changed files with 5055 additions and 9202 deletions
|
|
@ -1,19 +1,5 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
pub enum SettingsPage {
|
||||
Identity,
|
||||
#[default]
|
||||
Voice,
|
||||
AudioOutput,
|
||||
Network,
|
||||
Overlay,
|
||||
Appearance,
|
||||
Keybinds,
|
||||
Plugins,
|
||||
Advanced,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Channel {
|
||||
pub id: String,
|
||||
|
|
@ -38,16 +24,17 @@ pub struct ChatMessage {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct DmConversation {
|
||||
pub dm_id: String,
|
||||
pub other_user_id: String,
|
||||
pub other_nickname: String,
|
||||
pub unread_count: u32,
|
||||
pub e2ee_enabled: bool,
|
||||
pub e2ee_peer_public_key: Option<Vec<u8>>,
|
||||
pub e2ee_shared_secret: Option<[u8; 32]>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct GuildState {
|
||||
pub guild_id: String,
|
||||
pub name: String,
|
||||
pub owner_id: String,
|
||||
pub member_count: u32,
|
||||
}
|
||||
|
||||
|
|
@ -55,8 +42,6 @@ pub struct GuildState {
|
|||
pub struct FriendState {
|
||||
pub user_id: String,
|
||||
pub nickname: String,
|
||||
pub status: String,
|
||||
pub since: i64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
|
@ -79,14 +64,3 @@ pub(crate) fn bookmark_label_from_address(address: &str) -> String {
|
|||
.take(12)
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub(crate) fn now_utc_hms() -> String {
|
||||
let secs = std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map(|d| d.as_secs())
|
||||
.unwrap_or(0);
|
||||
let h = (secs % 86400) / 3600;
|
||||
let m = (secs % 3600) / 60;
|
||||
let s = secs % 60;
|
||||
format!("{h:02}:{m:02}:{s:02}")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue