mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Added link to 'Last build' notice showing commits since last release
This commit is contained in:
parent
77e074efc2
commit
d46e279933
1 changed files with 13 additions and 4 deletions
|
@ -524,15 +524,24 @@ App.prototype.resetLayout = function() {
|
||||||
App.prototype.setCompileMessage = function() {
|
App.prototype.setCompileMessage = function() {
|
||||||
// Display time since last build and compile message
|
// Display time since last build and compile message
|
||||||
let now = new Date(),
|
let now = new Date(),
|
||||||
timeSinceCompile = Utils.fuzzyTime(now.getTime() - window.compileTime),
|
timeSinceCompile = Utils.fuzzyTime(now.getTime() - window.compileTime);
|
||||||
compileInfo = "<span style=\"font-weight: normal\">Last build: " +
|
|
||||||
timeSinceCompile.substr(0, 1).toUpperCase() + timeSinceCompile.substr(1) + " ago";
|
// Calculate previous version to compare to
|
||||||
|
let prev = PKG_VERSION.split(".").map(n => {
|
||||||
|
return parseInt(n, 10);
|
||||||
|
});
|
||||||
|
if (prev[2] > 0) prev[2]--;
|
||||||
|
else if (prev[1] > 0) prev[1]--;
|
||||||
|
else prev[0]--;
|
||||||
|
|
||||||
|
const compareURL = `https://github.com/gchq/CyberChef/compare/v${prev.join(".")}...v${PKG_VERSION}`;
|
||||||
|
|
||||||
|
let compileInfo = `<a href='${compareURL}'>Last build: ${timeSinceCompile.substr(0, 1).toUpperCase() + timeSinceCompile.substr(1)} ago</a>`;
|
||||||
|
|
||||||
if (window.compileMessage !== "") {
|
if (window.compileMessage !== "") {
|
||||||
compileInfo += " - " + window.compileMessage;
|
compileInfo += " - " + window.compileMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
compileInfo += "</span>";
|
|
||||||
document.getElementById("notice").innerHTML = compileInfo;
|
document.getElementById("notice").innerHTML = compileInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue