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:
Loki 2026-07-14 13:25:15 +02:00
parent f361b037cb
commit 03d94e0465
Signed by: boba
GPG key ID: 253067914055423B
83 changed files with 5055 additions and 9202 deletions

99
src/ui/slint/voice.slint Normal file
View file

@ -0,0 +1,99 @@
import { Theme } from "theme.slint";
export struct VoiceMemberItem {
user_id: string,
nickname: string,
speaking: bool,
}
export component VoicePanel {
in-out property <[VoiceMemberItem]> members;
in-out property <bool> mic-enabled;
in-out property <bool> deafened;
in-out property <string> channel-name;
in-out property <string> activity-banner;
callback toggle-mic();
callback toggle-deafen();
callback leave-voice();
VerticalLayout {
padding: 16px;
spacing: 8px;
Text {
text: "🔊 " + channel-name;
color: Theme.text-primary;
}
Text {
text: activity-banner;
color: Theme.text-muted;
}
Flickable {
VerticalLayout {
for m in members: Rectangle {
height: 48px;
HorizontalLayout {
padding: 8px;
spacing: 8px;
Rectangle {
width: 12px;
height: 12px;
border-radius: 6px;
background: m.speaking ? Theme.success : Theme.text-muted;
}
Text {
text: m.nickname;
color: Theme.text-primary;
}
}
}
}
}
HorizontalLayout {
spacing: 8px;
Rectangle {
height: 32px;
background: Theme.accent;
border-radius: Theme.radius;
TouchArea {
clicked => { toggle-mic(); }
}
Text {
text: mic-enabled ? "Mute" : "Unmute";
color: Theme.text-primary;
horizontal-alignment: center;
vertical-alignment: center;
}
}
Rectangle {
height: 32px;
background: Theme.accent;
border-radius: Theme.radius;
TouchArea {
clicked => { toggle-deafen(); }
}
Text {
text: deafened ? "Undeafen" : "Deafen";
color: Theme.text-primary;
horizontal-alignment: center;
vertical-alignment: center;
}
}
Rectangle {
height: 32px;
background: Theme.danger;
border-radius: Theme.radius;
TouchArea {
clicked => { leave-voice(); }
}
Text {
text: "Leave";
color: Theme.text-primary;
horizontal-alignment: center;
vertical-alignment: center;
}
}
}
}
}