mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-01 11:35:32 +02:00
display loading page when hcharging file content
This commit is contained in:
@@ -1117,6 +1117,9 @@ angular
|
|||||||
$scope.content = "no_file_selected";
|
$scope.content = "no_file_selected";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const originalType = $scope.type;
|
||||||
|
$scope.type = "loading";
|
||||||
|
$scope.content = "loading";
|
||||||
$http
|
$http
|
||||||
.get(`/api/repo/${$scope.repoId}/file/${path}`, {
|
.get(`/api/repo/${$scope.repoId}/file/${path}`, {
|
||||||
transformResponse: (data) => {
|
transformResponse: (data) => {
|
||||||
@@ -1125,6 +1128,7 @@ angular
|
|||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
(res) => {
|
(res) => {
|
||||||
|
$scope.type = originalType;
|
||||||
$scope.content = res.data;
|
$scope.content = res.data;
|
||||||
if ($scope.content == "") {
|
if ($scope.content == "") {
|
||||||
$scope.content = null;
|
$scope.content = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user