44f7b5a697
ComfyUIMini's built-in gallery is view-only. Inject a "Manage Photos" link into its sidebar (via the shared head.ejs partial at build time, so no fork) that points to the Model Manager's delete-capable Gallery. The URL is built client-side from the browser host; the port is baked from the MODEL_MANAGER_PORT build arg (default 8189). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
904 B
HTML
21 lines
904 B
HTML
<!-- SparkyUI: inject a "Manage Photos" link into the ComfyUIMini sidebar that
|
|
points to the Model Manager's delete-capable Gallery. The URL is built
|
|
client-side from the browser host so it works on any LAN address. The
|
|
__MM_PORT__ token is replaced with MODEL_MANAGER_PORT at build time. -->
|
|
<script>
|
|
(function () {
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
var list = document.getElementById('sidebar-list');
|
|
if (!list || document.getElementById('sparky-gallery-link')) return;
|
|
var a = document.createElement('a');
|
|
a.id = 'sparky-gallery-link';
|
|
a.className = 'sidebar-list-item';
|
|
a.href = location.protocol + '//' + location.hostname + ':__MM_PORT__/?view=gallery';
|
|
a.innerHTML =
|
|
'<span class="icon gallery"></span>' +
|
|
'<span class="sidebar-list-item-text">Manage Photos</span>';
|
|
list.appendChild(a);
|
|
});
|
|
})();
|
|
</script>
|