From 42cb9d431c304052d4e62c7262b97038b311fb0b Mon Sep 17 00:00:00 2001 From: tdurieux Date: Fri, 13 Aug 2021 11:51:53 +0200 Subject: [PATCH] display loading page when hcharging file content --- public/script/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/script/app.js b/public/script/app.js index 406b301..68c5216 100644 --- a/public/script/app.js +++ b/public/script/app.js @@ -1117,6 +1117,9 @@ angular $scope.content = "no_file_selected"; return; } + const originalType = $scope.type; + $scope.type = "loading"; + $scope.content = "loading"; $http .get(`/api/repo/${$scope.repoId}/file/${path}`, { transformResponse: (data) => { @@ -1125,6 +1128,7 @@ angular }) .then( (res) => { + $scope.type = originalType; $scope.content = res.data; if ($scope.content == "") { $scope.content = null;