From f3320b802c12f29e5a3201fcc0abfe72be294293 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:32:54 -0500 Subject: Various UI fixes in config state tab --- javascript/extensions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'javascript/extensions.js') diff --git a/javascript/extensions.js b/javascript/extensions.js index c2786499..3c2f995a 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -50,7 +50,7 @@ function install_extension_from_index(button, url){ function config_state_confirm_restore(_, config_state_name, config_restore_type) { if (config_state_name == "Current") { - return [false, config_state_name]; + return [false, config_state_name, config_restore_type]; } let restored = ""; if (config_restore_type == "extensions") { @@ -60,6 +60,12 @@ function config_state_confirm_restore(_, config_state_name, config_restore_type) } else { restored = "the webui version and all saved extension versions"; } - let confirmed = confirm("Are you sure you want to restore from this state?\nThis will reset " + restored + ".\n(A backup of the current state will be made.)"); + let confirmed = confirm("Are you sure you want to restore from this state?\nThis will reset " + restored + "."); + if (confirmed) { + restart_reload(); + gradioApp().querySelectorAll('#extensions .extension_status').forEach(function(x){ + x.innerHTML = "Loading..." + }) + } return [confirmed, config_state_name, config_restore_type]; } -- cgit v1.2.3