impr: Make statistics format not suck a whole lot
This commit is contained in:
parent
6d1f639bc6
commit
c8150f3261
@ -81,8 +81,18 @@ namespace hex::init {
|
||||
// Make telemetry request
|
||||
nlohmann::json telemetry = {
|
||||
{ "uuid", uuid },
|
||||
{ "version", fmt::format("{}/{}", IMHEX_VERSION, ImHexApi::System::isPortableVersion() ? "Portable" : "Installed") },
|
||||
{ "os", fmt::format("{}/{}/{}/{}", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture(), ImHexApi::System::getGPUVendor()) }
|
||||
{ "format_version", "1" },
|
||||
{ "imhex_version", IMHEX_VERSION },
|
||||
#if defined(GIT_COMMIT_HASH_LONG) && defined(GIT_BRANCH)
|
||||
{ "imhex_commit", fmt::format("{}@{}", GIT_COMMIT_HASH_LONG, GIT_BRANCH) },
|
||||
#else
|
||||
{ "imhex_commit", "??@??" },
|
||||
#endif
|
||||
{ "install_type", ImHexApi::System::isPortableVersion() ? "Portable" : "Installed" },
|
||||
{ "os", ImHexApi::System::getOSName() },
|
||||
{ "os_version", ImHexApi::System::getOSVersion() },
|
||||
{ "arch", ImHexApi::System::getArchitecture() },
|
||||
{ "gpu_vendor", ImHexApi::System::getGPUVendor() }
|
||||
};
|
||||
|
||||
HttpRequest telemetryRequest("POST", ImHexApiURL + "/telemetry"s);
|
||||
|
@ -46,13 +46,25 @@ namespace hex::plugin::builtin {
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("hex.builtin.welcome.server_contact.data_collected.version"_lang);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(IMHEX_VERSION);
|
||||
ImGui::TextFormatted("{}/{}@{}/{}",
|
||||
IMHEX_VERSION,
|
||||
#if defined (GIT_COMMIT_HASH_LONG) && defined (GIT_BRANCH)
|
||||
GIT_COMMIT_HASH_LONG, GIT_BRANCH,
|
||||
#else
|
||||
"??", "??",
|
||||
#endif
|
||||
ImHexApi::System::isPortableVersion() ? "Portable" : "Installed"
|
||||
);
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("hex.builtin.welcome.server_contact.data_collected.os"_lang);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextWrapped("%s/%s/%s", ImHexApi::System::getOSName().c_str(), ImHexApi::System::getOSVersion().c_str(), ImHexApi::System::getArchitecture().c_str());
|
||||
ImGui::TextFormattedWrapped("{}/{}/{}/{}",
|
||||
ImHexApi::System::getOSName(),
|
||||
ImHexApi::System::getOSVersion(),
|
||||
ImHexApi::System::getArchitecture(),
|
||||
ImHexApi::System::getGPUVendor());
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user