mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-06 21:57:57 +02:00
improve dashboard page
This commit is contained in:
+12
-18
@@ -83,23 +83,20 @@ body {
|
|||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
.card-header .btn {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
.btn,
|
.btn,
|
||||||
.white_border,
|
.white_border,
|
||||||
.black_border {
|
.black_border {
|
||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 2px;
|
border-radius: 4px;
|
||||||
}
|
|
||||||
.card-header .btn {
|
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
.btn,
|
.btn,
|
||||||
.btn:hover,
|
.white_border,
|
||||||
a.white_border,
|
.black_border {
|
||||||
a.white_border:hover,
|
|
||||||
a.black_border,
|
|
||||||
a.black_border:hover {
|
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.btn::placeholder,
|
.btn::placeholder,
|
||||||
@@ -110,22 +107,19 @@ a.black_border:hover {
|
|||||||
opacity: 1; /* Firefox */
|
opacity: 1; /* Firefox */
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-photo {
|
|
||||||
border-radius: 50%;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.btn,
|
.btn,
|
||||||
.black_border {
|
.black_border {
|
||||||
|
color: #333333;
|
||||||
border: 1px solid #333333;
|
border: 1px solid #333333;
|
||||||
}
|
}
|
||||||
.btn,
|
|
||||||
.btn:hover,
|
.btn:hover,
|
||||||
a.black_border,
|
a.black_border:hover,
|
||||||
a.black_border:hover {
|
a.white_border:hover {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
background-color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn::placeholder,
|
.btn::placeholder,
|
||||||
.black_border::placeholder {
|
.black_border::placeholder {
|
||||||
/* Chrome, Firefox, Opera, Safari 10.1+ */
|
/* Chrome, Firefox, Opera, Safari 10.1+ */
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<button
|
<button
|
||||||
id="submit"
|
id="submit"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-primary"
|
class="btn black_border"
|
||||||
ng-click="claim()"
|
ng-click="claim()"
|
||||||
>
|
>
|
||||||
Claim
|
Claim
|
||||||
|
|||||||
@@ -1,7 +1,41 @@
|
|||||||
<div class="container-fluid h-100">
|
<div class="container-fluid h-100">
|
||||||
<div class="row h-100">
|
<div class="row h-100">
|
||||||
<div class="leftCol shadow p-1 h-100 overflow-auto">
|
<div class="leftCol shadow p-1 h-100 overflow-auto">
|
||||||
|
<a class="btn btn-block black_border" href="/anonymize">
|
||||||
|
<i class="fa fa-plus-circle" aria-hidden="true"></i> Anonymize
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
class="btn btn-block black_border"
|
||||||
|
href="/claim"
|
||||||
|
title="Claim the ownership of an existing anonymized repository."
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="bottom"
|
||||||
|
>
|
||||||
|
Claim repository
|
||||||
|
</a>
|
||||||
|
|
||||||
<h3>Filters</h3>
|
<h3>Filters</h3>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search">Search</label>
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
class="form-control"
|
||||||
|
id="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
ng-model="search"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="order">Order</label>
|
||||||
|
<select class="custom-select" ng-model="orderBy">
|
||||||
|
<option value="repoId">Repository ID</option>
|
||||||
|
<option value="fullName">Repository</option>
|
||||||
|
<option value="-anonymizeDate">Anonymize Date</option>
|
||||||
|
<option value="-status">Status</option>
|
||||||
|
<option value="-lastView">Last View</option>
|
||||||
|
<option value="-pageView">Page View</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<h5>Status</h5>
|
<h5>Status</h5>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
@@ -33,53 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col h-100 overflow-auto">
|
<div class="col h-100 overflow-auto">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col p-2">
|
<div class="col p-0">
|
||||||
<form>
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="col">
|
|
||||||
<input
|
|
||||||
type="search"
|
|
||||||
class="form-control"
|
|
||||||
id="search"
|
|
||||||
placeholder="Search repository..."
|
|
||||||
ng-model="search"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<label class="input-group-text" for="Order">Order</label>
|
|
||||||
</div>
|
|
||||||
<select class="custom-select" ng-model="orderBy">
|
|
||||||
<option value="repoId">Repository ID</option>
|
|
||||||
<option value="fullName">Repository</option>
|
|
||||||
<option value="-anonymizeDate">Anonymize Date</option>
|
|
||||||
<option value="-status">Status</option>
|
|
||||||
<option value="-lastView">Last View</option>
|
|
||||||
<option value="-pageView">Page View</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col text-right">
|
|
||||||
<a
|
|
||||||
class="btn btn-secondary"
|
|
||||||
href="/claim"
|
|
||||||
title="Claim the ownership of an existing anonymized repository."
|
|
||||||
data-toggle="tooltip"
|
|
||||||
data-placement="bottom"
|
|
||||||
>
|
|
||||||
Claim repository
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-primary" href="/anonymize">
|
|
||||||
<i class="fa fa-plus-circle" aria-hidden="true"></i> Anonymize
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col p-2">
|
|
||||||
<table class="table repositories">
|
<table class="table repositories">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -107,12 +95,23 @@
|
|||||||
>{{repo.repoId}}</a
|
>{{repo.repoId}}</a
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td
|
||||||
<a href="https://github.com/{{repo.fullName}}"
|
title="Commit: {{repo.commit}}"
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="bottom"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="https://github.com/{{repo.fullName}}/commit/{{repo.commit}}"
|
||||||
>{{repo.fullName}}</a
|
>{{repo.fullName}}</a
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td>{{repo.branch}}</td>
|
<td
|
||||||
|
title="Commit: {{repo.commit}}"
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="bottom"
|
||||||
|
>
|
||||||
|
{{repo.branch}}
|
||||||
|
</td>
|
||||||
<!-- <td>{{repo.commit.substring(0, 6)}}</td> -->
|
<!-- <td>{{repo.commit.substring(0, 6)}}</td> -->
|
||||||
<td class="text-center">{{repo.terms.length}}</td>
|
<td class="text-center">{{repo.terms.length}}</td>
|
||||||
<td class="text-center">{{repo.status | title}}</td>
|
<td class="text-center">{{repo.status | title}}</td>
|
||||||
|
|||||||
@@ -250,7 +250,7 @@
|
|||||||
<button
|
<button
|
||||||
id="save"
|
id="save"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-primary"
|
class="btn black_border"
|
||||||
ng-click="saveDefault($event)"
|
ng-click="saveDefault($event)"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ angular
|
|||||||
$http.post("/api/user/default", params).then(
|
$http.post("/api/user/default", params).then(
|
||||||
() => {
|
() => {
|
||||||
getDefault();
|
getDefault();
|
||||||
$scope.message = "Saved"
|
$scope.message = "Saved";
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
$translate("ERRORS." + error.data.error).then((translation) => {
|
$translate("ERRORS." + error.data.error).then((translation) => {
|
||||||
@@ -219,7 +219,9 @@ angular
|
|||||||
$location.url("/");
|
$location.url("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
setTimeout(() => {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
}, 250)
|
||||||
|
|
||||||
$scope.repositories = [];
|
$scope.repositories = [];
|
||||||
$scope.search = "";
|
$scope.search = "";
|
||||||
@@ -232,6 +234,14 @@ angular
|
|||||||
$http.get("/api/user/anonymized_repositories").then(
|
$http.get("/api/user/anonymized_repositories").then(
|
||||||
(res) => {
|
(res) => {
|
||||||
$scope.repositories = res.data;
|
$scope.repositories = res.data;
|
||||||
|
for (let repo of $scope.repositories) {
|
||||||
|
if (!repo.pageView) {
|
||||||
|
repo.pageView = 0;
|
||||||
|
}
|
||||||
|
if (!repo.lastView) {
|
||||||
|
repo.lastView = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user