mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-10 07:28:36 +02:00
fix repo update
This commit is contained in:
@@ -113,7 +113,7 @@
|
|||||||
{{$index + 1}}
|
{{$index + 1}}
|
||||||
</th>
|
</th>
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<a href="/r/{{repo.repoId}}" target="__self"
|
<a href="/r/{{repo.repoId}}"
|
||||||
>{{repo.repoId}}</a
|
>{{repo.repoId}}</a
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
@@ -185,7 +185,6 @@
|
|||||||
<a
|
<a
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
href="/anonymize/{{repo.repoId}}"
|
href="/anonymize/{{repo.repoId}}"
|
||||||
target="_self"
|
|
||||||
>
|
>
|
||||||
<i class="fa fa-edit" aria-hidden="true"></i> Edit
|
<i class="fa fa-edit" aria-hidden="true"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
@@ -218,7 +217,6 @@
|
|||||||
<a
|
<a
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
href="/r/{{repo.repoId}}/"
|
href="/r/{{repo.repoId}}/"
|
||||||
target="_self"
|
|
||||||
>
|
>
|
||||||
<i class="fa fa-eye" aria-hidden="true"></i> View Repo
|
<i class="fa fa-eye" aria-hidden="true"></i> View Repo
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
+17
-4
@@ -591,13 +591,15 @@ angular
|
|||||||
link: true,
|
link: true,
|
||||||
mode: "download",
|
mode: "download",
|
||||||
};
|
};
|
||||||
$scope.options.expirationDate.setDate(90);
|
$scope.options.expirationDate.setDate(
|
||||||
|
$scope.options.expirationDate.getDate() + 90
|
||||||
|
);
|
||||||
$scope.anonymize_readme = "";
|
$scope.anonymize_readme = "";
|
||||||
$scope.readme = "";
|
$scope.readme = "";
|
||||||
$scope.html_readme = "";
|
$scope.html_readme = "";
|
||||||
$scope.isUpdate = false;
|
$scope.isUpdate = false;
|
||||||
|
|
||||||
function getDefault() {
|
function getDefault(cb) {
|
||||||
$http.get("/api/user/default").then((res) => {
|
$http.get("/api/user/default").then((res) => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data.terms) {
|
if (data.terms) {
|
||||||
@@ -607,10 +609,13 @@ angular
|
|||||||
$scope.options.expirationDate = new Date(
|
$scope.options.expirationDate = new Date(
|
||||||
$scope.options.expirationDate
|
$scope.options.expirationDate
|
||||||
);
|
);
|
||||||
|
$scope.options.expirationDate.setDate(
|
||||||
|
$scope.options.expirationDate.getDate() + 90
|
||||||
|
);
|
||||||
|
if (cb) cb();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getDefault();
|
getDefault(() => {
|
||||||
|
|
||||||
if ($routeParams.repoId && $routeParams.repoId != "") {
|
if ($routeParams.repoId && $routeParams.repoId != "") {
|
||||||
$scope.isUpdate = true;
|
$scope.isUpdate = true;
|
||||||
$scope.repoId = $routeParams.repoId;
|
$scope.repoId = $routeParams.repoId;
|
||||||
@@ -622,9 +627,16 @@ angular
|
|||||||
$scope.branch = res.data.branch;
|
$scope.branch = res.data.branch;
|
||||||
$scope.options = res.data.options;
|
$scope.options = res.data.options;
|
||||||
$scope.conference = res.data.conference;
|
$scope.conference = res.data.conference;
|
||||||
|
if (res.data.options.expirationDate) {
|
||||||
$scope.options.expirationDate = new Date(
|
$scope.options.expirationDate = new Date(
|
||||||
res.data.options.expirationDate
|
res.data.options.expirationDate
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$scope.options.expirationDate = new Date();
|
||||||
|
$scope.options.expirationDate.setDate(
|
||||||
|
$scope.options.expirationDate.getDate() + 90
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$scope.details = (await $http.get(
|
$scope.details = (await $http.get(
|
||||||
`/api/repo/${res.data.fullName}/`
|
`/api/repo/${res.data.fullName}/`
|
||||||
@@ -645,6 +657,7 @@ angular
|
|||||||
$scope.anonymize.repositories.$$element[0].disabled = true;
|
$scope.anonymize.repositories.$$element[0].disabled = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.repositories = [];
|
$scope.repositories = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user