[feat] use fix random password otherwise user regenerates one

This commit is contained in:
dijunkun
2024-08-28 10:28:11 +08:00
parent 93d7f71cf2
commit d8297ebb74
2 changed files with 4 additions and 1 deletions

View File

@@ -154,7 +154,7 @@ int Render::LocalWindow() {
ImGui::InputTextWithHint( ImGui::InputTextWithHint(
"##server_pwd", "##server_pwd",
localization::max_password_len[localization_language_index_].c_str(), 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 show_password_ ? ImGuiInputTextFlags_CharsNoBlank
: ImGuiInputTextFlags_CharsNoBlank | : ImGuiInputTextFlags_CharsNoBlank |
ImGuiInputTextFlags_Password); ImGuiInputTextFlags_Password);

View File

@@ -130,6 +130,9 @@ int Render::LoadSettingsFromCacheFile() {
memset(&client_id_, 0, sizeof(client_id_)); memset(&client_id_, 0, sizeof(client_id_));
strncpy(client_id_, cd_cache_.client_id, sizeof(client_id_)); strncpy(client_id_, cd_cache_.client_id, sizeof(client_id_));
password_saved_ = cd_cache_.password; password_saved_ = cd_cache_.password;
if (!password_saved_.empty() && 6 == password_saved_.length()) {
password_inited_ = true;
}
language_button_value_ = cd_cache_.language; language_button_value_ = cd_cache_.language;
video_quality_button_value_ = cd_cache_.video_quality; video_quality_button_value_ = cd_cache_.video_quality;
video_encode_format_button_value_ = cd_cache_.video_encode_format; video_encode_format_button_value_ = cd_cache_.video_encode_format;