1
0
mirror of https://github.com/koloml/philomena-tagging-assistant.git synced 2026-09-23 04:19:39 +00:00

Added Tag Presets, popup editor for them, implemented presets image edit

This commit is contained in:
2026-03-12 00:17:45 +04:00
parent 6c2ef795b3
commit 74866949bb
24 changed files with 720 additions and 8 deletions

11
src/lib/dom-utils.ts Normal file
View File

@@ -0,0 +1,11 @@
/**
* Reusable function to create icons from FontAwesome. Usable only for website, since extension doesn't host its own
* copy of FA styles. Extension should use imports of SVGs inside CSS instead.
* @param iconSlug Slug of the icon to be added.
* @return Element with classes for FontAwesome icon added.
*/
export function createFontAwesomeIcon(iconSlug: string): HTMLElement {
const iconElement = document.createElement('i');
iconElement.classList.add('fa-solid', `fa-${iconSlug}`);
return iconElement;
}