add tags item css improved. see #183

This commit is contained in:
mic 2024-12-14 22:39:11 +01:00
parent 5439a56395
commit 1f63c9c798
2 changed files with 11 additions and 0 deletions

View file

@ -63,6 +63,10 @@ body {
background-color: #e9e9e9;
}
.prompt_add_tags{
background-color: #cfe9ff;
}
@media (prefers-color-scheme: dark) {
@ -96,4 +100,8 @@ body {
.mzta_autocomplete-item-active {
background-color: #444444;
}
.prompt_add_tags{
background-color: #353542;
}
}

View file

@ -129,6 +129,9 @@ async function searchPrompt(allPrompts, tabId, tabType){
itemDiv.classList.add('mzta_autocomplete-item');
itemDiv.textContent = item.label;
itemDiv.setAttribute('data-id', item.id);
if(item.id === 'prompt_add_tags'){
itemDiv.className += ' prompt_add_tags';
}
// Add a mousedown event to select the item
itemDiv.addEventListener('mousedown', function(e) { // Use mousedown instead of click