added styling to delete page, split environment vars to separate page
This commit is contained in:
parent
dfb7b885af
commit
3bc5dea947
5 changed files with 82 additions and 39 deletions
|
@ -82,6 +82,11 @@
|
|||
controller: 'RepoEditCtrl',
|
||||
resolve: resolveUser
|
||||
})
|
||||
.when('/:owner/:name/edit/env', {
|
||||
templateUrl: '/static/scripts/views/repos_env.html',
|
||||
controller: 'RepoEditCtrl',
|
||||
resolve: resolveUser
|
||||
})
|
||||
.when('/:owner/:name/delete', {
|
||||
templateUrl: '/static/scripts/views/repos_del.html',
|
||||
controller: 'RepoEditCtrl',
|
||||
|
|
|
@ -24,11 +24,18 @@
|
|||
|
||||
<article>
|
||||
|
||||
<section>
|
||||
<a href="/{{ repo.full_name }}/edit">Cancel</a>
|
||||
<button ng-click="delete(repo.full_name)">Delete</button>
|
||||
</form>
|
||||
|
||||
<section style="padding:30px; background-color:#EF5350;">
|
||||
<button ng-click="delete(repo.full_name)" style="color:rgba(255,255,255,0.9);
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
border: 1px solid rgba(255,255,255,0.9);
|
||||
padding: 10px;
|
||||
background:transparent;
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
margin-right: 10px;">Delete</button>
|
||||
<span style="color:rgba(255,255,255,0.9);font-size:16px;">Warning: this action cannot be undone.</span>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<article>
|
||||
<section>
|
||||
<h2>Hooks</h2>
|
||||
<h2>Settings</h2>
|
||||
<div class="row">
|
||||
<div>Post Commit Hooks</div>
|
||||
<div>
|
||||
|
@ -40,10 +40,20 @@
|
|||
<label for="pull_requests" class="switch"></label>
|
||||
</div>
|
||||
</div>
|
||||
<a class="row" ng-href="{{ repo.full_name }}/edit/env">
|
||||
<div>Private Variables</div>
|
||||
<div>
|
||||
Inject private variables into your build environment
|
||||
</div>
|
||||
</a>
|
||||
<a class="row" ng-href="{{ repo.full_name }}/delete">
|
||||
<div>Delete</div>
|
||||
<div>Delete this repository and its build history</div>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section ng-if="user.admin">
|
||||
<h2>Advanced</h2>
|
||||
<h2>Admin settings</h2>
|
||||
<div class="row">
|
||||
<div>Trusted (Evelvate Privilege)</div>
|
||||
<div>
|
||||
|
@ -60,30 +70,6 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<form>
|
||||
|
||||
<ul>
|
||||
<li ng-repeat="(key, value) in repo.params">
|
||||
<label>{{ key }}</label>
|
||||
<input type="text" ng-model="repo.params[key]"/>
|
||||
<button ng-click="deleteParam(key)">remove</button>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" ng-model="param.key" />
|
||||
<input type="text" ng-model="param.value" />
|
||||
<button ng-click="addParam(param)">add</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<button ng-click="save(repo)">Save</button>
|
||||
<button ng-click="delete(repo.full_name)">Delete</button>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Badges</h2>
|
||||
<div class="row">
|
||||
|
@ -106,12 +92,4 @@
|
|||
<pre class="snippet snippet-padding">{{ repo.keypair.public }}</pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Delete</h2>
|
||||
<a class="row" href="{{ repo.full_name }}/delete">
|
||||
<div>Delete this Repository</div>
|
||||
<div></div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
|
|
42
cmd/drone-server/static/scripts/views/repos_env.html
Normal file
42
cmd/drone-server/static/scripts/views/repos_env.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<header>
|
||||
<a class="logo float-left" href="/"></a>
|
||||
<a class="menu-item settings float-right" href="/profile"></a>
|
||||
<a class="menu-item users float-right" href="/users" ng-if="user.admin"></a>
|
||||
<a class="menu-item help float-right" href="http://readme.drone.io" target="_blank"></a>
|
||||
<a class="menu-item user-name float-right" href="/profile">{{ "+"+user.login }}</a>
|
||||
</header>
|
||||
|
||||
<div class="toolbar">
|
||||
|
||||
<div class="breadcrumb" style="position:relative;top:0px;">
|
||||
<a href="/{{ repo.full_name }}/edit" class="icon icon-home"></a>
|
||||
<a ng-href="/{{ repo.full_name }}">{{ repo.owner }} / {{ repo.name }}</a>
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<a ng-href="/{{ repo.full_name }}/edit" class="nav-item settings float-right"></a>
|
||||
<button ng-click="watch(repo)" ng-if="!repo.starred" class="nav-item star float-right"></button>
|
||||
<button ng-click="unwatch(repo)" ng-if="repo.starred" class="nav-item unstar float-right"></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<article>
|
||||
<section>
|
||||
<form>
|
||||
<ul>
|
||||
<li ng-repeat="(key, value) in repo.params">
|
||||
<label>{{ key }}</label>
|
||||
<input type="text" ng-model="repo.params[key]"/>
|
||||
<button ng-click="deleteParam(key)">remove</button>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" ng-model="param.key" />
|
||||
<input type="text" ng-model="param.value" />
|
||||
<button ng-click="addParam(param)">add</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<button ng-click="save(repo)">Save</button>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
|
@ -1346,12 +1346,23 @@ section .row {
|
|||
display: block;
|
||||
display: flex;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
section .row:hover {
|
||||
section a.row:hover {
|
||||
background:#FAFAFA;
|
||||
}
|
||||
|
||||
section a.row:after {
|
||||
content: "\f29c";
|
||||
font-family: Material-Design-Iconic-Font;
|
||||
line-height: 74px;
|
||||
font-size: 26px;
|
||||
color: rgb(204, 204, 204);
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
}
|
||||
|
||||
section .row > div:first-child {
|
||||
padding: 30px 0px;
|
||||
border-bottom: 1px solid #EEE;
|
||||
|
|
Loading…
Reference in a new issue