From 515e254ad94b03af81275839b92a88fbf0d80579 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 20 Feb 2021 11:03:54 +0100 Subject: [PATCH] Remove useless server configuration loads --- assets/js/components/passwordInput.js | 16 +--------------- assets/js/pages/settings/sections/privacy.js | 1 - 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/assets/js/components/passwordInput.js b/assets/js/components/passwordInput.js index 5a55a5fe..745a8625 100644 --- a/assets/js/components/passwordInput.js +++ b/assets/js/components/passwordInput.js @@ -32,19 +32,7 @@ class PasswordInput { class: "help-block" }); - this._init(); - } - - async _init() { - try { - await ServerConfig.ensureLoaded() - this._ready = true; - this._valid = false; - this._refreshArea(); - } catch(e) { - console.error(e); - notify(tr("Failed to load server configuration! Please reload the page!"), "danger"); - } + this._refreshArea(); } setFirstName(firstName) { @@ -80,8 +68,6 @@ class PasswordInput { } _refreshArea() { - if (!this._ready) - return; this.helpArea.innerHTML = ""; diff --git a/assets/js/pages/settings/sections/privacy.js b/assets/js/pages/settings/sections/privacy.js index 60176192..a9421ea1 100644 --- a/assets/js/pages/settings/sections/privacy.js +++ b/assets/js/pages/settings/sections/privacy.js @@ -95,7 +95,6 @@ const SettingsPrivacySection = { const settings = await SettingsInterface.getDataConservationPolicy(); // Load server policy - await ServerConfig.ensureLoaded(); const serverPolicy = ServerConfig.conf.data_conservation_policy; // Use Vue