docs: rewrite README with feature list, tech stack, status table; fix Slint padding warnings; update encryption status
This commit is contained in:
parent
49e1f38793
commit
44d284a568
12 changed files with 135 additions and 49 deletions
|
|
@ -69,6 +69,10 @@ fn sync_sidebar(window: &MainWindow, state: &UiState, own_nickname: &str) {
|
|||
let channels: Vec<ChannelItem> = state
|
||||
.channels
|
||||
.iter()
|
||||
.filter(|c| match guild_id {
|
||||
None => true,
|
||||
Some(gid) => c.guild_id.as_deref() == Some(gid) || c.guild_id.is_none(),
|
||||
})
|
||||
.map(|c| ChannelItem {
|
||||
channel_id: SharedString::from(c.id.as_str()),
|
||||
name: SharedString::from(c.name.as_str()),
|
||||
|
|
|
|||
|
|
@ -60,21 +60,21 @@ export component SettingsWindow {
|
|||
background: active-tab == "audio" ? Theme.accent : Theme.bg-interactive;
|
||||
border-radius: Theme.radius;
|
||||
TouchArea { clicked => { active-tab = "audio"; } }
|
||||
Text { text: "Audio"; color: Theme.text-primary; font-size: 13px; padding-left: 12px; padding-right: 12px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
Text { text: "Audio"; color: Theme.text-primary; font-size: 13px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
}
|
||||
Rectangle {
|
||||
height: 28px;
|
||||
background: active-tab == "network" ? Theme.accent : Theme.bg-interactive;
|
||||
border-radius: Theme.radius;
|
||||
TouchArea { clicked => { active-tab = "network"; } }
|
||||
Text { text: "Network"; color: Theme.text-primary; font-size: 13px; padding-left: 12px; padding-right: 12px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
Text { text: "Network"; color: Theme.text-primary; font-size: 13px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
}
|
||||
Rectangle {
|
||||
height: 28px;
|
||||
background: active-tab == "identity" ? Theme.accent : Theme.bg-interactive;
|
||||
border-radius: Theme.radius;
|
||||
TouchArea { clicked => { active-tab = "identity"; } }
|
||||
Text { text: "Identity"; color: Theme.text-primary; font-size: 13px; padding-left: 12px; padding-right: 12px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
Text { text: "Identity"; color: Theme.text-primary; font-size: 13px; horizontal-alignment: center; vertical-alignment: center; }
|
||||
}
|
||||
HorizontalLayout { horizontal-stretch: 1; }
|
||||
Rectangle {
|
||||
|
|
|
|||
|
|
@ -44,30 +44,35 @@ impl UiState {
|
|||
id: "general".into(),
|
||||
name: "general".into(),
|
||||
kind: "text".into(),
|
||||
guild_id: None,
|
||||
members: Vec::new(),
|
||||
},
|
||||
Channel {
|
||||
id: "dev-talk".into(),
|
||||
name: "dev-talk".into(),
|
||||
kind: "text".into(),
|
||||
guild_id: None,
|
||||
members: Vec::new(),
|
||||
},
|
||||
Channel {
|
||||
id: "plugins".into(),
|
||||
name: "plugins".into(),
|
||||
kind: "text".into(),
|
||||
guild_id: None,
|
||||
members: Vec::new(),
|
||||
},
|
||||
Channel {
|
||||
id: "lobby".into(),
|
||||
name: "lobby".into(),
|
||||
kind: "voice".into(),
|
||||
guild_id: None,
|
||||
members: Vec::new(),
|
||||
},
|
||||
Channel {
|
||||
id: "gaming".into(),
|
||||
name: "gaming".into(),
|
||||
kind: "voice".into(),
|
||||
guild_id: None,
|
||||
members: Vec::new(),
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ pub struct Channel {
|
|||
pub id: String,
|
||||
pub name: String,
|
||||
pub kind: String,
|
||||
pub guild_id: Option<String>,
|
||||
pub members: Vec<String>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,6 +311,7 @@ fn chat_handle(ui: &mut UiState, net: &NetHandle, event: NetEvent) {
|
|||
channel_name,
|
||||
kind,
|
||||
members,
|
||||
guild_id,
|
||||
..
|
||||
} => {
|
||||
let mems: Vec<String> = members
|
||||
|
|
@ -322,11 +323,15 @@ fn chat_handle(ui: &mut UiState, net: &NetHandle, event: NetEvent) {
|
|||
.collect();
|
||||
if let Some(ch) = ui.channels.iter_mut().find(|c| c.id == channel_id) {
|
||||
ch.members = mems;
|
||||
if guild_id.is_some() {
|
||||
ch.guild_id = guild_id.clone();
|
||||
}
|
||||
} else {
|
||||
ui.channels.push(crate::ui::state::Channel {
|
||||
id: channel_id.clone(),
|
||||
name: channel_name,
|
||||
kind: kind.clone(),
|
||||
guild_id: guild_id.clone(),
|
||||
members: mems,
|
||||
});
|
||||
}
|
||||
|
|
@ -347,12 +352,14 @@ fn chat_handle(ui: &mut UiState, net: &NetHandle, event: NetEvent) {
|
|||
channel_id,
|
||||
channel_name,
|
||||
kind,
|
||||
guild_id,
|
||||
} => {
|
||||
if !ui.channels.iter().any(|c| c.id == channel_id) {
|
||||
ui.channels.push(crate::ui::state::Channel {
|
||||
id: channel_id,
|
||||
name: channel_name,
|
||||
kind,
|
||||
guild_id,
|
||||
members: Vec::new(),
|
||||
});
|
||||
}
|
||||
|
|
@ -381,6 +388,7 @@ fn chat_handle(ui: &mut UiState, net: &NetHandle, event: NetEvent) {
|
|||
id: c.channel_id,
|
||||
name: c.channel_name,
|
||||
kind: c.kind,
|
||||
guild_id: c.guild_id,
|
||||
members,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue