[feat] Use server to generate transmission id and client id

This commit is contained in:
dijunkun
2024-08-06 17:27:40 +08:00
parent 07f5fe81c8
commit 880c2949c3
7 changed files with 43 additions and 21 deletions

View File

@@ -47,9 +47,17 @@ int Render::LocalWindow() {
ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH);
ImGui::SetWindowFontScale(1.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
std::string client_id_show = "";
for (int i = 0; i < sizeof(client_id_); i++) {
client_id_show += client_id_[i];
if (i == 2 || i == 5) {
client_id_show += " ";
}
}
ImGui::InputText(
"##local_id", (char *)mac_addr_str_.c_str(),
mac_addr_str_.length() + 1,
"##local_id", (char *)client_id_show.c_str(), sizeof(client_id_show),
ImGuiInputTextFlags_CharsUppercase | ImGuiInputTextFlags_ReadOnly);
ImGui::PopStyleVar();
@@ -61,7 +69,7 @@ int Render::LocalWindow() {
if (ImGui::Button(ICON_FA_COPY, ImVec2(35, 38))) {
local_id_copied_ = true;
ImGui::SetClipboardText(mac_addr_str_.c_str());
ImGui::SetClipboardText(client_id_);
copy_start_time_ = ImGui::GetTime();
}