mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-07-21 21:01:24 +08:00
hint
This commit is contained in:
parent
739d5fef5a
commit
7d79019f7a
36
javascript/modelHelp.js
Normal file
36
javascript/modelHelp.js
Normal file
@ -0,0 +1,36 @@
|
||||
(function () {
|
||||
let link = null;
|
||||
|
||||
onUiLoaded(() => {
|
||||
const modules = document.getElementById("setting_sd_modules");
|
||||
const title = modules.querySelector("span");
|
||||
|
||||
link = document.createElement("a");
|
||||
link.href = "https://github.com/Haoming02/sd-webui-forge-classic/wiki/Download-Models";
|
||||
link.title = "Where to get the modules?";
|
||||
link.textContent = "?";
|
||||
|
||||
link.style.marginLeft = "0.5em";
|
||||
link.style.padding = "0em 0.5em";
|
||||
link.style.border = "var(--input-border-width) solid var(--input-border-color)";
|
||||
link.style.borderRadius = "var(--input-radius)";
|
||||
link.style.background = "var(--input-background-fill)";
|
||||
|
||||
link.style.visibility = "hidden";
|
||||
title.appendChild(link);
|
||||
});
|
||||
|
||||
onAfterUiUpdate(() => {
|
||||
const preset = document.getElementById("forge_ui_preset").querySelector("input");
|
||||
if (preset == null) return;
|
||||
if (["sd", "xl"].includes(preset.value)) {
|
||||
link.style.visibility = "hidden";
|
||||
return;
|
||||
}
|
||||
|
||||
const modules = document.getElementById("setting_sd_modules");
|
||||
const input = modules.querySelector("div.wrap-inner");
|
||||
if (input == null) return;
|
||||
link.style.visibility = input.querySelector("div.token") ? "hidden" : "visible";
|
||||
});
|
||||
})();
|
||||
Loading…
Reference in New Issue
Block a user