Added display of build revision to UI.

Closes #321.
This commit is contained in:
Oliver Hamlet
2014-11-02 16:35:01 +00:00
parent 6c0fb0b8dd
commit 1da4ca8fcf
3 changed files with 11 additions and 1 deletions
+9
View File
@@ -1271,6 +1271,15 @@ function initVars() {
try {
loot.version = JSON.parse(result);
/* The fourth part of the version string is the build number. Trim it. */
var pos = loot.version.lastIndexOf('.');
if (loot.version.length > pos + 1) {
document.getElementById('LOOTBuild').textContent = loot.version.substring(pos + 1);
} else {
document.getElementById('LOOTBuild').textContent = 'unknown';
}
loot.version = loot.version.substring(0, pos);
document.getElementById('LOOTVersion').textContent = loot.version;
document.getElementById('firstTimeLootVersion').textContent = loot.version;
} catch (e) {
+1
View File
@@ -505,6 +505,7 @@
<dialog id="about">
<h1>LOOT <span id="LOOTVersion"></span></h1>
<p><small>Build <span id="LOOTBuild"></span></small>
<p>Copyright &copy; 2012&ndash;2014 WrinklyNinja
<p>Load order optimisation for Oblivion, Skyrim, Fallout 3 and Fallout: New Vegas.
<p><a href="http://loot.github.io">http://loot.github.io</a>
+1 -1
View File
@@ -541,7 +541,7 @@ namespace loot {
std::string Handler::GetVersion() {
BOOST_LOG_TRIVIAL(info) << "Getting LOOT version.";
YAML::Node version(to_string(g_version_major) + "." + to_string(g_version_minor) + "." + to_string(g_version_patch));
YAML::Node version(to_string(g_version_major) + "." + to_string(g_version_minor) + "." + to_string(g_version_patch) + "." + g_build_revision);
return JSON::stringify(version);
}