Commit 4eb9caf6 authored by Ivanq's avatar Ivanq

Move [diff] next to hash

parent 7c3f09f7
......@@ -85,7 +85,7 @@
<div class="commit">
<div class="commit-title" id="commit_title"></div>
<div class="commit-description" id="commit_description">
<a href="#" id="permanent_link">Copy permanent link</a><br>
<a href="#" id="permanent_link">Copy permanent link</a>
</div>
</div>
</div>
......
......@@ -43,11 +43,12 @@ repo.addMerger()
.then(c => {
let diff = document.createElement("a");
diff.textContent = "[diff]";
diff.href = "../commit/?" + address + "/" + c;
document.getElementById("commit_title").appendChild(diff);
});
diff.href = "commit/?" + address + "/" + c;
document.getElementById("commit_description").appendChild(diff);
document.getElementById("commit_description").appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
document.getElementById("commit_description").appendChild(document.createElement("br"));
document.getElementById("commit_description").appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
});
return repo.getFiles(head, "");
})
......
......@@ -84,7 +84,7 @@
<div class="commit">
<div class="commit-title" id="commit_title"></div>
<div class="commit-description" id="commit_description">
<a href="#" id="permanent_link">Copy permanent link</a><br>
<a href="#" id="permanent_link">Copy permanent link</a>
</div>
</div>
</div>
......
......@@ -46,10 +46,11 @@ repo.addMerger()
let diff = document.createElement("a");
diff.textContent = "[diff]";
diff.href = "commit/?" + address + "/" + c;
document.getElementById("commit_title").appendChild(diff);
});
document.getElementById("commit_description").appendChild(diff);
document.getElementById("commit_description").appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
document.getElementById("commit_description").appendChild(document.createElement("br"));
document.getElementById("commit_description").appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
});
return repo.getFiles(head, path);
})
......
......@@ -93,11 +93,6 @@ repo.addMerger()
title.textContent = commit.content.message;
node.appendChild(title);
let diffLink = document.createElement("a");
diffLink.innerHTML = "[diff]";
diffLink.href = "../commit/?" + address + "/" + commit.id;
title.appendChild(diffLink);
let description = document.createElement("div");
description.className = "commit-description";
......@@ -106,6 +101,13 @@ repo.addMerger()
commitLink.textContent = commit.id;
description.appendChild(commitLink);
description.appendChild(document.createTextNode(" "));
let diffLink = document.createElement("a");
diffLink.innerHTML = "[diff]";
diffLink.href = "../commit/?" + address + "/" + commit.id;
description.appendChild(diffLink);
description.appendChild(document.createElement("br"));
description.appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment