Commit ba7a4743 authored by Ivanq's avatar Ivanq

Show 'downloaded' icon on user page

parent 476edd0f
......@@ -59,6 +59,7 @@
<script type="text/javascript" src="../ZeroLib/ZeroDB.js"></script>
<script type="text/javascript" src="../ZeroLib/ZeroID.js"></script>
<script type="text/javascript" src="../workerout/workerout.js"></script>
<script type="text/javascript" src="../js/repo.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="../js/root.js"></script>
</body>
......
......@@ -12,7 +12,13 @@ let loadProfile = address => {
let user = location.search.replace(/[?&]wrapper_nonce=.*/, "").replace("?", "");
loadProfile(user)
let downloaded;
Repository.getDownloadedRepos(zeroPage)
.then(d => {
downloaded = d;
return loadProfile(user);
})
.then(profile => {
if(profile.commitName) {
return profile.commitName;
......@@ -66,6 +72,12 @@ loadProfile(user)
stars.innerHTML = repo.stars;
node.appendChild(stars);
if(downloaded.indexOf(repo.address) > -1) {
let downloaded = document.createElement("div");
downloaded.className = "repo-downloaded";
node.appendChild(downloaded);
}
let title = document.createElement("div");
title.className = "repo-title";
title.textContent = repo.title;
......
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