瀏覽代碼

link footer API to Wiki when API is not active

w-e-w 2 年之前
父節點
當前提交
96e446218c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      html/footer.html
  2. 1 1
      modules/ui.py

+ 1 - 1
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>
          • 

+ 1 - 1
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)