mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 17:05: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 owner = params("owner")
|
||||||
val repository = params("repository")
|
val repository = params("repository")
|
||||||
contentType = formats("json")
|
contentType = formats("json")
|
||||||
|
val creating = RepositoryCreationService.isCreating(owner, repository)
|
||||||
Serialization.write(Map(
|
Serialization.write(Map(
|
||||||
"creating" -> RepositoryCreationService.isCreating(owner, repository),
|
"creating" -> creating,
|
||||||
"error" -> RepositoryCreationService.getCreationError(owner, repository)
|
"error" -> (if(creating) None else RepositoryCreationService.getCreationError(owner, repository))
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
function checkCreating() {
|
function checkCreating() {
|
||||||
$.get('@context.path/@owner/@repository/creating', function (data) {
|
$.get('@context.path/@owner/@repository/creating', function (data) {
|
||||||
console.log(data);
|
|
||||||
if (data.creating == true) {
|
if (data.creating == true) {
|
||||||
setTimeout(checkCreating, 2000);
|
setTimeout(checkCreating, 2000);
|
||||||
} else {
|
} else {
|
||||||
@@ -31,9 +30,7 @@
|
|||||||
$('#error').show();
|
$('#error').show();
|
||||||
$('#progress').hide();
|
$('#progress').hide();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){
|
setTimeout(function(){ location.href = '@context.path/@owner/@repository'; });
|
||||||
location.href = '@context.path/@owner/@repository';
|
|
||||||
}, 2000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user