aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-12-06 12:41:55 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2021-12-06 11:52:26 +0000
commita7e8da9da8fbf50ca15f5550bc319c1941b0bb00 (patch)
tree4f8a32501e80bd206b0efb3475e19bad00719a2c /apps/files_external/js
parent3a1ef2b012a903ee4e08483fd47afbd6fc111ca3 (diff)
downloadnextcloud-server-a7e8da9da8fbf50ca15f5550bc319c1941b0bb00.tar.gz
nextcloud-server-a7e8da9da8fbf50ca15f5550bc319c1941b0bb00.zip
Add spinner when loading ext storages
Signed-off-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/settings.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 32c4b1bc03b..bed380bab14 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -907,6 +907,14 @@ MountConfigListView.prototype = _.extend({
loadStorages: function() {
var self = this;
+ var onLoaded1 = $.Deferred();
+ var onLoaded2 = $.Deferred();
+
+ this.$el.find('.externalStorageLoading').removeClass('hidden');
+ $.when(onLoaded1, onLoaded2).always(() => {
+ self.$el.find('.externalStorageLoading').addClass('hidden');
+ })
+
if (this._isPersonal) {
// load userglobal storages
$.ajax({
@@ -953,8 +961,11 @@ MountConfigListView.prototype = _.extend({
$('#emptycontent').show();
}
onCompletion.resolve();
+ onLoaded1.resolve();
}
});
+ } else {
+ onLoaded1.resolve();
}
var url = this._storageConfigClass.prototype._url;
@@ -973,6 +984,7 @@ MountConfigListView.prototype = _.extend({
self.recheckStorageConfig($tr);
});
onCompletion.resolve();
+ onLoaded2.resolve();
}
});
},