Commit 3419d215 authored by Ivanq's avatar Ivanq

Show maintainers in 'Settings' page

parent 746980ca
.settings-header {
font-size: 24px;
}
.entry {
width: 1024px;
margin: 16px auto;
}
.entry-title {
display: inline-block;
width: 128px;
vertical-align: middle;
font-size: 16px;
}
.entry-value {
display: inline-block;
width: calc(100% - 128px);
vertical-align: middle;
}
.entry-value-margin {
margin-left: 16px;
}
.entry-value-separator {
display: inline-block;
width: 1px;
height: 32px;
margin: 0 16px;
vertical-align: top;
background-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="../css/tabs.css">
<link rel="stylesheet" type="text/css" href="../css/info.css">
<link rel="stylesheet" type="text/css" href="css/settings.css">
</head>
<body>
<header class="header">
<img src="../../img/logo-white.svg" class="header-logo">
<div class="header-name">Git Center</div>
</header>
<main class="middle">
<h1 id="repo_name"></h1>
<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 class="tab">
<img src="../../img/pr-merged.svg" width="16">
Pull requests
</a>
<a id="settings_link" class="tab tab-current">
<img src="../../img/settings.svg" width="16">
Settings
</a>
</main>
<div class="info">
<h2 class="settings-header">Visibility settings</h2>
</div>
<div class="entry">
<div class="entry-title">Visibility</div>
<div class="entry-value">
<select class="select">
<option>Visible (the repository is listed in index)</option>
<option>Hidden (the repository is not listed, but accessable by link)</option>
</select>
</div>
</div>
<div class="entry">
<div class="entry-title">Maintainers</div>
<div class="entry-value">
<select class="select" id="maintainers_select">
<option>Fetching maintainers...</option>
</select>
<a class="button entry-value-margin" id="maintainers_remove">Remove</a>
<div class="entry-value-separator"></div>
<a class="button button-blue" id="maintainers_add">Add</a>
</div>
</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/git.js"></script>
<script type="text/javascript" src="../../js/repo.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/user_common.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
\ No newline at end of file
repo.addMerger()
.then(() => {
return repo.getContent();
})
.then(content => {
showTitle(content.title);
showTabs(1);
return repo.getMaintainers();
})
.then(maintainers => {
let select = document.getElementById("maintainers_select");
select.innerHTML = "";
maintainers.forEach(maintainer => {
let option = document.createElement("option");
option.textContent = maintainer.name + "@zeroid.bit";
select.appendChild(option);
});
});
\ 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