(query)
| 2938 | } |
| 2939 | |
| 2940 | function filterFileIcons(query) { |
| 2941 | const q = String(query || "").trim().toLowerCase(); |
| 2942 | return FILE_ICONS.filter((i) => { |
| 2943 | if (ICON_SIZE_FILTER !== "all" && !(i.tags || []).includes(ICON_SIZE_FILTER)) return false; |
| 2944 | const hay = [i.name, i.file, ...(i.tags || [])].join(" ").toLowerCase(); |
| 2945 | if (!q) return true; |
| 2946 | return hay.includes(q); |
| 2947 | }); |
| 2948 | } |
| 2949 | |
| 2950 | async function addIconElement(icon) { |
| 2951 | const inferred = inferSizeFromPath(icon.file); |