Stable Diffusion: Open ComfyUI link for the running RunPod pod

cd5f87400e939c2597aad154d502228c27aaa9ce

permissionBRICK <40219477+permissionBRICK@users.noreply.github.com>

2 files changed, +12 -0Ignore whitespace
public/scripts/extensions/stable-diffusion/index.js+8 -0
@@ -1479,6 +1479,14 @@ function renderRunpodStatus(status) {
1479 const phase = status?.state ?? 'red';1479 const phase = status?.state ?? 'red';
1480 dot.classList.remove('sd_runpod_red', 'sd_runpod_orange', 'sd_runpod_green');1480 dot.classList.remove('sd_runpod_red', 'sd_runpod_orange', 'sd_runpod_green');
1481 dot.classList.add(`sd_runpod_${['red', 'orange', 'green'].includes(phase) ? phase : 'red'}`);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 if (!status) {1490 if (!status) {
1483 text.textContent = 'proxy unreachable';1491 text.textContent = 'proxy unreachable';
1484 } else if (phase === 'green') {1492 } else if (phase === 'green') {
public/scripts/extensions/stable-diffusion/settings.html+4 -0
@@ -88,6 +88,10 @@
88 <i class="fa-solid fa-power-off"></i>88 <i class="fa-solid fa-power-off"></i>
89 <span data-i18n="Shut down">Shut down</span>89 <span data-i18n="Shut down">Shut down</span>
90 </div>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 </div>95 </div>
92 <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>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 <hr>97 <hr>