mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 12:29:04 +08:00
add display-name option for https://github.com/rustdesk/rustdesk-server-pro/issues/277
This commit is contained in:
parent
ac88121c4a
commit
8621b93436
@ -2122,6 +2122,8 @@ pub mod keys {
|
|||||||
pub const OPTION_DISABLE_GROUP_PANEL: &str = "disable-group-panel";
|
pub const OPTION_DISABLE_GROUP_PANEL: &str = "disable-group-panel";
|
||||||
pub const OPTION_PRE_ELEVATE_SERVICE: &str = "pre-elevate-service";
|
pub const OPTION_PRE_ELEVATE_SERVICE: &str = "pre-elevate-service";
|
||||||
|
|
||||||
|
pub const OPTION_DISPLAY_NAME: &str = "display-name";
|
||||||
|
|
||||||
// proxy settings
|
// proxy settings
|
||||||
// The following options are not real keys, they are just used for custom client advanced settings.
|
// The following options are not real keys, they are just used for custom client advanced settings.
|
||||||
// The real keys are in Config2::socks.
|
// The real keys are in Config2::socks.
|
||||||
@ -2185,6 +2187,8 @@ pub mod keys {
|
|||||||
OPTION_KEEP_SCREEN_ON,
|
OPTION_KEEP_SCREEN_ON,
|
||||||
OPTION_DISABLE_GROUP_PANEL,
|
OPTION_DISABLE_GROUP_PANEL,
|
||||||
OPTION_PRE_ELEVATE_SERVICE,
|
OPTION_PRE_ELEVATE_SERVICE,
|
||||||
|
OPTION_DISPLAY_NAME,
|
||||||
|
"remove-preset-password-warning",
|
||||||
];
|
];
|
||||||
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
||||||
pub const KEYS_SETTINGS: &[&str] = &[
|
pub const KEYS_SETTINGS: &[&str] = &[
|
||||||
|
@ -2019,11 +2019,15 @@ impl LoginConfigHandler {
|
|||||||
} else {
|
} else {
|
||||||
(my_id, self.id.clone())
|
(my_id, self.id.clone())
|
||||||
};
|
};
|
||||||
|
let mut display_name = LocalConfig::get_option(&config::keys::OPTION_DISPLAY_NAME);
|
||||||
|
if display_name.is_empty() {
|
||||||
|
display_name = crate::username();
|
||||||
|
}
|
||||||
let mut lr = LoginRequest {
|
let mut lr = LoginRequest {
|
||||||
username: pure_id,
|
username: pure_id,
|
||||||
password: password.into(),
|
password: password.into(),
|
||||||
my_id,
|
my_id,
|
||||||
my_name: crate::username(),
|
my_name: display_name,
|
||||||
option: self.get_option_message(true).into(),
|
option: self.get_option_message(true).into(),
|
||||||
session_id: self.session_id,
|
session_id: self.session_id,
|
||||||
version: crate::VERSION.to_string(),
|
version: crate::VERSION.to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user