mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-10 18:06:01 +02:00
improve cap
This commit is contained in:
parent
f0c5580f57
commit
2864e1984a
1 changed files with 14 additions and 9 deletions
|
@ -2318,16 +2318,21 @@ impl LoginConfigHandler {
|
|||
display_name = crate::username();
|
||||
}
|
||||
let display_name = display_name
|
||||
.chars()
|
||||
.enumerate()
|
||||
.map(|(i, c)| {
|
||||
if i == 0 {
|
||||
c.to_uppercase().to_string()
|
||||
} else {
|
||||
c.to_string()
|
||||
}
|
||||
.split_whitespace()
|
||||
.map(|word| {
|
||||
word.chars()
|
||||
.enumerate()
|
||||
.map(|(i, c)| {
|
||||
if i == 0 {
|
||||
c.to_uppercase().to_string()
|
||||
} else {
|
||||
c.to_string()
|
||||
}
|
||||
})
|
||||
.collect::<String>()
|
||||
})
|
||||
.collect::<String>();
|
||||
.collect::<Vec<_>>()
|
||||
.join(" ");
|
||||
#[cfg(not(target_os = "android"))]
|
||||
let my_platform = whoami::platform().to_string();
|
||||
#[cfg(target_os = "android")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue