mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 08:55:50 +01:00
(refs #1846) Fix repository creation indicator's condition
This commit is contained in:
@@ -168,9 +168,10 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
val owner = params("owner")
|
||||
val repository = params("repository")
|
||||
contentType = formats("json")
|
||||
val creating = RepositoryCreationService.isCreating(owner, repository)
|
||||
Serialization.write(Map(
|
||||
"creating" -> RepositoryCreationService.isCreating(owner, repository),
|
||||
"error" -> RepositoryCreationService.getCreationError(owner, repository)
|
||||
"creating" -> creating,
|
||||
"error" -> (if(creating) None else RepositoryCreationService.getCreationError(owner, repository))
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
function checkCreating() {
|
||||
$.get('@context.path/@owner/@repository/creating', function (data) {
|
||||
console.log(data);
|
||||
if (data.creating == true) {
|
||||
setTimeout(checkCreating, 2000);
|
||||
} else {
|
||||
@@ -31,9 +30,7 @@
|
||||
$('#error').show();
|
||||
$('#progress').hide();
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
location.href = '@context.path/@owner/@repository';
|
||||
}, 2000);
|
||||
setTimeout(function(){ location.href = '@context.path/@owner/@repository'; });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user