mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-11 09:11:29 +03:00
cap display name
This commit is contained in:
@@ -2317,6 +2317,17 @@ impl LoginConfigHandler {
|
|||||||
if display_name.is_empty() {
|
if display_name.is_empty() {
|
||||||
display_name = crate::username();
|
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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect::<String>();
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
let my_platform = whoami::platform().to_string();
|
let my_platform = whoami::platform().to_string();
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
|
|||||||
Reference in New Issue
Block a user