Stable Diffusion: Open ComfyUI link for the running RunPod pod
| @@ -1479,6 +1479,14 @@ function renderRunpodStatus(status) { | ||
| 1479 | 1479 | const phase = status?.state ?? 'red'; |
| 1480 | 1480 | dot.classList.remove('sd_runpod_red', 'sd_runpod_orange', 'sd_runpod_green'); |
| 1481 | 1481 | dot.classList.add(`sd_runpod_${['red', 'orange', 'green'].includes(phase) ? phase : 'red'}`); |
| 1482 | + const openLink = document.getElementById('sd_runpod_open'); | |
| 1483 | + if (openLink) { | |
| 1484 | + const showLink = phase === 'green' && status?.url; | |
| 1485 | + openLink.style.display = showLink ? '' : 'none'; | |
| 1486 | + if (showLink) { | |
| 1487 | + openLink.href = status.url; | |
| 1488 | + } | |
| 1489 | + } | |
| 1482 | 1490 | if (!status) { |
| 1483 | 1491 | text.textContent = 'proxy unreachable'; |
| 1484 | 1492 | } else if (phase === 'green') { |
| @@ -88,6 +88,10 @@ | ||
| 88 | 88 | <i class="fa-solid fa-power-off"></i> |
| 89 | 89 | <span data-i18n="Shut down">Shut down</span> |
| 90 | 90 | </div> |
| 91 | + <a id="sd_runpod_open" class="menu_button menu_button_icon" href="#" target="_blank" rel="noopener" title="Open the pod's ComfyUI web interface" data-i18n="[title]sd_runpod_open" style="display: none;"> | |
| 92 | + <i class="fa-solid fa-up-right-from-square"></i> | |
| 93 | + <span data-i18n="Open ComfyUI">Open ComfyUI</span> | |
| 94 | + </a> | |
| 91 | 95 | </div> |
| 92 | 96 | <small data-i18n="sd_runpod_small">While a SillyTavern tab is open, a keepalive ping keeps the pod alive; it shuts down 15 minutes after the last activity either way. Red = off, orange = starting/downloading models, green = ready.</small> |
| 93 | 97 | <hr> |