mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 20:39:25 -03:00
fix(ui): show title tooltips on disabled showcase media control buttons
This commit is contained in:
@@ -157,9 +157,9 @@ async function checkImportedRecipes(container) {
|
||||
recipeButtons.forEach(btn => {
|
||||
const id = btn.dataset.imageId;
|
||||
if (id && data.results[id]?.in_library) {
|
||||
btn.disabled = true;
|
||||
btn.title = 'Already imported as recipe';
|
||||
btn.classList.add('disabled');
|
||||
btn.setAttribute('aria-disabled', 'true');
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -510,6 +510,11 @@ export function initMediaControlHandlers(container) {
|
||||
btn.addEventListener('click', async function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
// Ignore clicks when disabled
|
||||
if (this.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const imageMetaRaw = this.dataset.imageMeta;
|
||||
const imageUrl = this.dataset.imageUrl;
|
||||
const imageNsfw = this.dataset.imageNsfw;
|
||||
|
||||
Reference in New Issue
Block a user