From b677d3e27d626a09a49794f0c3e41e9c75fcd8c7 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Tue, 9 May 2023 18:11:58 +0200 Subject: Show loading spinner until share settings are fully loaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The inputs of the sharing settings are generated in a template in the server, but the listeners to react to changes in the elements and save the values in the server are loaded in the client once the DOM finishes loading. If the DOM takes long to load the user can start to interact with the settings before the listeners were set up and, therefore, the changes would not be saved in the server. However, as the inputs are modified the user would think that the changes were already saved. To address that now when the sharing settings are open a loading spinner is shown instead of the contents of the sharing settings, and only once the listeners to save the changes were set up the spinner is removed and the contents shown. Signed-off-by: Daniel Calviño Sánchez --- apps/settings/src/admin.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/settings/src') diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js index e7220df3c91..8bdfa1d0770 100644 --- a/apps/settings/src/admin.js +++ b/apps/settings/src/admin.js @@ -286,4 +286,6 @@ window.addEventListener('DOMContentLoaded', () => { if (document.getElementById('security-warning') !== null) { setupChecks() } + + $('#shareAPI').removeClass('loading') }) -- cgit v1.2.3