diff --git a/public/scripts/utils.js b/public/scripts/utils.js index bf0953c50..55b82211b 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -1938,7 +1938,7 @@ export async function showFontAwesomePicker(customList = null) { } } }); - qry.addEventListener('input', qryDebounced); + qry.addEventListener('input', () => qryDebounced()); search.append(qry); } dom.append(search); @@ -1953,10 +1953,7 @@ export async function showFontAwesomePicker(customList = null) { opt.classList.add(fa); opt.title = fa.slice(3); opt.dataset.result = POPUP_RESULT.AFFIRMATIVE.toString(); - opt.addEventListener('click', ()=>{ - value = fa; - picker.completeAffirmative(); - }); + opt.addEventListener('click', () => value = fa); grid.append(opt); } } @@ -1964,7 +1961,7 @@ export async function showFontAwesomePicker(customList = null) { } } let value = ''; - const picker = new Popup(dom, POPUP_TYPE.CONFIRM, null, { allowVerticalScrolling:true, okButton: 'No Icon', cancelButton: 'Cancel' }); + const picker = new Popup(dom, POPUP_TYPE.TEXT, null, { allowVerticalScrolling: true, okButton: 'No Icon', cancelButton: 'Cancel' }); await picker.show(); if (picker.result == POPUP_RESULT.AFFIRMATIVE) { return value; diff --git a/public/style.css b/public/style.css index 02df98177..f8da6c1a7 100644 --- a/public/style.css +++ b/public/style.css @@ -5346,6 +5346,11 @@ body:not(.movingUI) .drawer-content.maximized { color: #FAF8F6; } +.popup.vertical_scrolling_dialogue_popup:has(.faPicker) { + /* Fix height for fa picker popup, otherwise search is making it resize weirdly */ + height: 70%; +} + .faPicker { display: flex; gap: 1em; @@ -5365,3 +5370,9 @@ body:not(.movingUI) .drawer-content.maximized { } } } + +.faPicker:not(:has(:not(.hidden)))::after { + content: 'No icons found'; + color: var(--SmartThemeBodyColor); + opacity: 0.7; +}