aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-06 18:58:44 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-06 18:58:44 +0900
commit96e446218cf80c9b095ea7d69f3b1fafb32bf462 (patch)
tree01ad49f102de703f6296d45dc7bf49ccb986a658
parenta009fe15fd98b44aede07c47bf7938fb4280924b (diff)
link footer API to Wiki when API is not active
-rw-r--r--html/footer.html2
-rw-r--r--modules/ui.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/html/footer.html b/html/footer.html
index 1ce13295..69b2372c 100644
--- a/html/footer.html
+++ b/html/footer.html
@@ -1,5 +1,5 @@
<div>
- <a href="/docs">API</a>
+ <a href="{api_docs}">API</a>
 • 
<a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">Github</a>
 • 
diff --git a/modules/ui.py b/modules/ui.py
index 3315cc17..e2e3b6da 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1501,7 +1501,7 @@ def create_ui():
gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)
footer = shared.html("footer.html")
- footer = footer.format(versions=versions_html())
+ footer = footer.format(versions=versions_html(), api_docs="/docs" if shared.cmd_opts.api else "https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API")
gr.HTML(footer, elem_id="footer")
settings.add_functionality(demo)