Update context menu actions to use icon buttons for improved accessibility

This commit is contained in:
Will Miao
2025-02-18 00:15:02 +08:00
parent 89026db8c3
commit 6181a1c714

View File

@@ -23,19 +23,23 @@ export class LoraContextMenu {
switch(action) { switch(action) {
case 'detail': case 'detail':
this.currentCard.querySelector('.info-button').click(); // Trigger the main card click which shows the modal
this.currentCard.click();
break; break;
case 'civitai': case 'civitai':
this.currentCard.querySelector('.civitai-button').click(); // Only trigger if the card is from civitai
if (this.currentCard.dataset.from_civitai === 'true') {
this.currentCard.querySelector('.fa-globe')?.click();
}
break; break;
case 'copyname': case 'copyname':
this.currentCard.querySelector('.copy-button').click(); this.currentCard.querySelector('.fa-copy')?.click();
break; break;
case 'preview': case 'preview':
this.currentCard.querySelector('.preview-button').click(); this.currentCard.querySelector('.fa-image')?.click();
break; break;
case 'delete': case 'delete':
this.currentCard.querySelector('.delete-button').click(); this.currentCard.querySelector('.fa-trash')?.click();
break; break;
case 'move': case 'move':
// To be implemented // To be implemented