MCPcopy Create free account
hub / github.com/antfu/sd-webui-qrcode-toolkit / after_component

Method after_component

scripts/interface.py:12–21  ·  view source on GitHub ↗
(self, component, **kwargs)

Source from the content-addressed store, hash-verified

10 return scripts.AlwaysVisible
11
12 def after_component(self, component, **kwargs):
13 # Add button to both txt2img and img2img tabs
14 if kwargs.get("elem_id") == "extras_tab":
15 send_button1 = gr.Button(
16 "Send to QR Compare", elem_id=f"qrtoolkit_send_button")
17 send_button1.click(None, [], None, _js="() => qrtoolkitSendImage()")
18
19 send_button2 = gr.Button(
20 "Send to QR Scanner", elem_id=f"qrtoolkit_send_scanner_button")
21 send_button2.click(None, [], None, _js="() => qrtoolkitSendScanner()")
22
23 def ui(self, is_img2img):
24 return []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected