mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[feat] use fix random password otherwise user regenerates one
This commit is contained in:
@@ -154,7 +154,7 @@ int Render::LocalWindow() {
|
||||
ImGui::InputTextWithHint(
|
||||
"##server_pwd",
|
||||
localization::max_password_len[localization_language_index_].c_str(),
|
||||
(char *)random_password_.c_str(), random_password_.length() + 1,
|
||||
(char *)password_saved_.c_str(), password_saved_.length() + 1,
|
||||
show_password_ ? ImGuiInputTextFlags_CharsNoBlank
|
||||
: ImGuiInputTextFlags_CharsNoBlank |
|
||||
ImGuiInputTextFlags_Password);
|
||||
|
||||
@@ -130,6 +130,9 @@ int Render::LoadSettingsFromCacheFile() {
|
||||
memset(&client_id_, 0, sizeof(client_id_));
|
||||
strncpy(client_id_, cd_cache_.client_id, sizeof(client_id_));
|
||||
password_saved_ = cd_cache_.password;
|
||||
if (!password_saved_.empty() && 6 == password_saved_.length()) {
|
||||
password_inited_ = true;
|
||||
}
|
||||
language_button_value_ = cd_cache_.language;
|
||||
video_quality_button_value_ = cd_cache_.video_quality;
|
||||
video_encode_format_button_value_ = cd_cache_.video_encode_format;
|
||||
|
||||
Reference in New Issue
Block a user