Commit 94349973 authored by Ivanq's avatar Ivanq

Add /repo/network

parent f927bef9
.commits {
display: block;
width: 1024px;
padding: 0 calc(50% - 512px);
margin: 16px 0;
}
.commit {
display: block;
margin-top: 16px;
padding: 3px 10px 3px 8px;
border: 1px solid #D5D5D5;
border-radius: 4px;
box-shadow: 0 4px 4px #DDD;
background-image: linear-gradient(to bottom, #FCFCFC 0%, #EEE 100%);
background-repeat: no-repeat;
font-size: 16px;
line-height: 24px;
text-decoration: none;
}
.commit-title {
font-size: 24px;
line-height: 32px;
}
.commit-description {
color: #888;
}
.note {
display: block;
margin-top: 16px;
font-size: 16px;
line-height: 24px;
color: #888;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Git Center</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<base href="" target="_top" id="base">
<script>base.href = document.location.href.replace("/media", "").replace("index.html", "").replace(/[&?]wrapper=False/, "").replace(/[&?]wrapper_nonce=[A-Za-z0-9]+/, "")</script>
<link rel="stylesheet" type="text/css" href="../../css/main.css">
<link rel="stylesheet" type="text/css" href="../../css/buttons.css">
<link rel="stylesheet" type="text/css" href="../../css/header.css">
<link rel="stylesheet" type="text/css" href="../../css/content.css">
<link rel="stylesheet" type="text/css" href="../../hljs/default.min.css">
<link rel="stylesheet" type="text/css" href="../css/tabs.css">
<link rel="stylesheet" type="text/css" href="../css/info.css">
<link rel="stylesheet" type="text/css" href="css/network.css">
</head>
<body>
<header class="header">
<a href="../..">
<img src="../../img/logo-white.svg" class="header-logo">
<div class="header-name">Git Center</div>
</a>
<a href="../../index/">
<div class="header-item">Repository Index</div>
</a>
<a href="../../myrepos/">
<div class="header-item">My Repos</div>
</a>
<a href="../../workflow/">
<div class="header-item">Git Center workflow</div>
</a>
<a href="../../support/">
<div class="header-item">Support</div>
</a>
</header>
<main class="middle">
<h1 id="repo_name"></h1>
<div id="middle_buttons" class="middle-buttons">
<input type="text" class="middle-button-margin input" id="git_url">
<a class="middle-button-margin button" id="fork">Fork</a>
<a class="middle-button-margin button button-blue publish" id="publish" title="Use this option after pushing if you disabled automatical publishing via no-sign or no-publish keys">Sign &amp; Publish changes</a>
</div>
<a id="code_link" class="tab">
<img src="../../img/code.svg" width="16">
Code
</a>
<a id="issues_link" class="tab">
<img src="../../img/issue-open.svg" width="16">
Issues
</a>
<a id="pull_requests_link" class="tab">
<img src="../../img/pr-merged.svg" width="16">
Pull requests
</a>
<a id="network_link" class="tab tab-current">
<img src="../../img/network.svg" width="16">
Network
</a>
<a id="settings_link" class="settings-link tab">
<img src="../../img/settings.svg" width="16">
Settings
</a>
</main>
<div class="info">
<select class="select branches" id="branches"></select>
</div>
<div id="commits" class="commits"></div>
<template id="edit_icon_tmpl">
<img src="../../img/edit.svg" class="edit-icon" id="edit_icon" width="16" height="16">
</template>
<script type="text/javascript" src="../../js/ZeroFrame.js"></script>
<script type="text/javascript" src="../../js/ZeroPage.js"></script>
<script type="text/javascript" src="../../js/ZeroFS.js"></script>
<script type="text/javascript" src="../../js/ZeroAuth.js"></script>
<script type="text/javascript" src="../../js/ZeroDB.js"></script>
<script type="text/javascript" src="../../js/pako.js"></script>
<script type="text/javascript" src="../../js/sha.js"></script>
<script type="text/javascript" src="../../gitgraph/gitgraph.js"></script>
<script type="text/javascript" src="../../js/git.js"></script>
<script type="text/javascript" src="../../js/repo.js"></script>
<script type="text/javascript" src="../js/user_common.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
\ No newline at end of file
if(address == "1RepoXU8bQE9m7ssNwL4nnxBnZVejHCc6") {
location.href = "../../default/";
}
branch = additional;
let content;
repo.addMerger()
.then(() => {
return repo.getContent();
})
.then(c => {
content = c;
if(!content.installed) {
location.href = "../../install/?" + address;
}
if(!branch) {
return repo.git.getHead()
.then(head => branch = head);
}
})
.then(() => {
showTitle(content.title);
showHeader(1);
showTabs(1);
showBranches();
/*
let template = {
colors: ["#5EC4CD", "#9A6AD6", "#FFB800", "#FF9A40"],
branch: {
lineWidth: 8,
lineDash: ["dotted"],
spacingX: 32,
labelRotation: 0,
showLabel: true,
mergeStyle: "bezier",
labelFont: "normal 12px Verdana"
},
commit: {
spacingY: -48,
dot: {
size: 8
},
tag: {
font: "normal 12px Verdana"
},
message: {
displayAuthor: true,
displayBranch: false,
displayHash: true,
font: "normal 16px Verdana"
},
tooltipHTMLFormatter: commit => {
return "[" + commit.sha1 + "] " + commit.message;
}
}
};
let graph = new GitGraph({
template: new GitGraph.Template(template),
orientation: "vertical-reverse",
mode: "extended",
elementId: "network"
});
*/
return repo.getCommits(branch, 100);
})
.then(commits => {
commits.forEach(commit => {
if(commit.content.parents.length > 1) {
let note = document.createElement("div");
note.className = "note";
note.innerHTML = "Commits " + commit.content.parents.map(commit => commit.id).join(", ") + " were merged into " + commit.id;
document.getElementById("commits").appendChild(note);
}
let node = document.createElement("div");
node.className = "commit";
let title = document.createElement("div");
title.className = "commit-title";
title.textContent = commit.content.message;
node.appendChild(title);
let description = document.createElement("div");
description.className = "commit-description";
let link = document.createElement("a");
link.innerHTML = commit.id;
link.href = "../?" + address + "/@" + commit.id;
description.appendChild(link);
description.appendChild(document.createElement("br"));
description.appendChild(document.createTextNode(repo.parseAuthor(commit.content.committer)));
node.appendChild(description);
document.getElementById("commits").appendChild(node);
if(commit.content.delivered) {
let note = document.createElement("div");
note.className = "note";
note.innerHTML = "Commit " + commit.id + " was likely delivered from " + commit.content.delivered.map(commit => commit.id).join(", ");
document.getElementById("commits").appendChild(note);
}
});
});
\ No newline at end of file
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