From 4fa673a68af3a447b59dd82af74c98e93ef1d60a Mon Sep 17 00:00:00 2001 From: gutris1 <132797949+gutris1@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:33:55 +0700 Subject: [PATCH 1/5] Update settings.js --- javascript/settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/javascript/settings.js b/javascript/settings.js index b2d981c21..754471ade 100644 --- a/javascript/settings.js +++ b/javascript/settings.js @@ -41,8 +41,10 @@ onUiLoaded(function() { settings_tabs.insertBefore(edit, settings_tabs.firstChild); settings_tabs.appendChild(buttonShowAllPages); - buttonShowAllPages.addEventListener("click", settingsShowAllTabs); + + var settingsResultOutput = gradioApp().querySelector("#settings_result > div.svelte-1ed2p3z"); + settingsResultOutput.classList.add("prose"); }); From a0379187482e68af0a1bfa2edeada1e177a19883 Mon Sep 17 00:00:00 2001 From: gutris1 <132797949+gutris1@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:35:06 +0700 Subject: [PATCH 2/5] Update style.css --- style.css | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index 64ef61bad..3476d8109 100644 --- a/style.css +++ b/style.css @@ -480,8 +480,20 @@ div.toprow-compact-tools{ } #settings_result{ - height: 1.4em; - margin: 0 1.2em; + height: auto; + width: auto; +} + +#settings_result.block{ + margin: 0 0.8em; + max-height: 10em; + overflow-y: auto !important; + background-color: var(--input-background-fill); +} + +#settings_result > div.svelte-1ed2p3z{ + margin: 0; + padding: 13px; } table.popup-table{ From 8c6c9736145fe0874db6ce630b4919e4d4146c91 Mon Sep 17 00:00:00 2001 From: gutris1 <132797949+gutris1@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:36:26 +0700 Subject: [PATCH 3/5] Update ui_settings.py --- modules/ui_settings.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ui_settings.py b/modules/ui_settings.py index e53ad50f8..55b5caf93 100644 --- a/modules/ui_settings.py +++ b/modules/ui_settings.py @@ -86,7 +86,13 @@ class UiSettings: opts.save(shared.config_filename) except RuntimeError: return opts.dumpjson(), f'{len(changed)} settings changed without save: {", ".join(changed)}.' - return opts.dumpjson(), f'{len(changed)} settings changed{": " if changed else ""}{", ".join(changed)}.' + + result_output = f'{len(changed)} settings changed:' + result_output += "".join(f"
{item}" for item in changed) + existing_result = self.result.value or "" + updated_result = f"{existing_result}
{result_output}" if existing_result else result_output + + return opts.dumpjson(), updated_result def run_settings_single(self, value, key): if not opts.same_type(value, opts.data_labels[key].default): From 45493949cddbcbab457a755bf9cd54eb236654a7 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Sat, 28 Dec 2024 17:18:40 +0900 Subject: [PATCH 4/5] Revert This reverts commit 8c6c9736145fe0874db6ce630b4919e4d4146c91. Revert "Update settings.js" This reverts commit 4fa673a68af3a447b59dd82af74c98e93ef1d60a. Revert "Update style.css" This reverts commit a0379187482e68af0a1bfa2edeada1e177a19883. --- javascript/settings.js | 4 +--- modules/ui_settings.py | 8 +------- style.css | 16 ++-------------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/javascript/settings.js b/javascript/settings.js index 754471ade..b2d981c21 100644 --- a/javascript/settings.js +++ b/javascript/settings.js @@ -41,10 +41,8 @@ onUiLoaded(function() { settings_tabs.insertBefore(edit, settings_tabs.firstChild); settings_tabs.appendChild(buttonShowAllPages); - buttonShowAllPages.addEventListener("click", settingsShowAllTabs); - var settingsResultOutput = gradioApp().querySelector("#settings_result > div.svelte-1ed2p3z"); - settingsResultOutput.classList.add("prose"); + buttonShowAllPages.addEventListener("click", settingsShowAllTabs); }); diff --git a/modules/ui_settings.py b/modules/ui_settings.py index 55b5caf93..e53ad50f8 100644 --- a/modules/ui_settings.py +++ b/modules/ui_settings.py @@ -86,13 +86,7 @@ class UiSettings: opts.save(shared.config_filename) except RuntimeError: return opts.dumpjson(), f'{len(changed)} settings changed without save: {", ".join(changed)}.' - - result_output = f'{len(changed)} settings changed:' - result_output += "".join(f"
{item}" for item in changed) - existing_result = self.result.value or "" - updated_result = f"{existing_result}
{result_output}" if existing_result else result_output - - return opts.dumpjson(), updated_result + return opts.dumpjson(), f'{len(changed)} settings changed{": " if changed else ""}{", ".join(changed)}.' def run_settings_single(self, value, key): if not opts.same_type(value, opts.data_labels[key].default): diff --git a/style.css b/style.css index 3476d8109..64ef61bad 100644 --- a/style.css +++ b/style.css @@ -480,20 +480,8 @@ div.toprow-compact-tools{ } #settings_result{ - height: auto; - width: auto; -} - -#settings_result.block{ - margin: 0 0.8em; - max-height: 10em; - overflow-y: auto !important; - background-color: var(--input-background-fill); -} - -#settings_result > div.svelte-1ed2p3z{ - margin: 0; - padding: 13px; + height: 1.4em; + margin: 0 1.2em; } table.popup-table{ From b82ba9b0be1f8a66ce040bf153574702a82b0d2e Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Sat, 28 Dec 2024 17:20:59 +0900 Subject: [PATCH 5/5] setting change scroll when over 5 line --- style.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/style.css b/style.css index 64ef61bad..0b255bc48 100644 --- a/style.css +++ b/style.css @@ -480,8 +480,10 @@ div.toprow-compact-tools{ } #settings_result{ - height: 1.4em; + min-height: 1.4em; margin: 0 1.2em; + max-height: calc(var(--text-md) * var(--line-sm) * 5); + overflow-y: auto; } table.popup-table{