mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 22:27:29 +00:00
UI: Improve the Tools checkbox list style
This commit is contained in:
parent
fdd8e5b1fd
commit
09d5e049d6
3 changed files with 103 additions and 2 deletions
17
js/main.js
17
js/main.js
|
|
@ -303,6 +303,23 @@ for(i = 0; i < scrollbarElements.length; i++) {
|
|||
scrollbarElements[i].style.resize = "none";
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
// Tools: inject "Refresh list" link into the label
|
||||
//------------------------------------------------
|
||||
const toolsTitle = document.querySelector("#tools-group > [data-testid='block-info']");
|
||||
const toolsInfo = toolsTitle ? toolsTitle.nextElementSibling : null;
|
||||
if (toolsInfo) {
|
||||
const refreshLink = document.createElement("span");
|
||||
refreshLink.textContent = " [Refresh list]";
|
||||
refreshLink.className = "tools-refresh-link";
|
||||
refreshLink.addEventListener("click", function(e) {
|
||||
e.preventDefault();
|
||||
document.querySelector("#tools-refresh-btn").click();
|
||||
});
|
||||
toolsInfo.appendChild(refreshLink);
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// Remove some backgrounds
|
||||
//------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue