Update icon utility files to remove library.add() calls

Updated Workflow and Libraries icon files to export icon arrays instead of calling library.add(). Also updated useInvocationGraph to remove library registration.
This commit is contained in:
Dannon Baker
2025-11-02 12:58:32 -05:00
parent 0d6de7d265
commit c39ea47c73
3 changed files with 25 additions and 23 deletions
+24 -14
View File
@@ -1,4 +1,3 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faCheckSquare, faFile, faFolder, faSave, faSquare } from "@fortawesome/free-regular-svg-icons";
import {
faAngleDoubleLeft,
@@ -16,7 +15,7 @@ import {
faUsers,
} from "@fortawesome/free-solid-svg-icons";
const tableIcons = [
export const tableIcons = [
faFile,
faFolder,
faSpinner,
@@ -34,16 +33,27 @@ const tableIcons = [
faMinusSquare,
];
const manageIcons = [faAngleDoubleLeft, faSave, faFile];
const librariesIcons = [faGlobe, faPencilAlt, faSave, faTimes, faTrash, faUsers, faHome, faUnlock];
export const manageIcons = [faAngleDoubleLeft, faSave, faFile];
export const librariesIcons = [faGlobe, faPencilAlt, faSave, faTimes, faTrash, faUsers, faHome, faUnlock];
export function initFolderTableIcons() {
tableIcons.forEach((icon) => library.add(icon));
}
export function initPermissionsIcons() {
manageIcons.forEach((icon) => library.add(icon));
}
export function initLibrariesIcons() {
librariesIcons.forEach((icon) => library.add(icon));
}
// Export individual icons for direct importing
export {
faAngleDoubleLeft,
faBan,
faCheckSquare,
faFile,
faFolder,
faGlobe,
faHome,
faKey,
faMinusSquare,
faPencilAlt,
faSave,
faShieldAlt,
faSpinner,
faSquare,
faTimes,
faTrash,
faUnlock,
faUsers,
};
-6
View File
@@ -1,9 +1,3 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faFile } from "@fortawesome/free-regular-svg-icons";
import { faFolderOpen, faPause, faPencilAlt, faSitemap, faWrench } from "@fortawesome/free-solid-svg-icons";
library.add(faWrench, faFile, faSitemap, faPencilAlt, faPause, faFolderOpen);
export default {
tool: "fa-wrench",
data_input: "fa-file-o fa-file", // fa-file-o for older FontAwesome, fa-file is the only thing I could find newer font awesome
+1 -3
View File
@@ -1,4 +1,4 @@
import { type IconDefinition, library } from "@fortawesome/fontawesome-svg-core";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import {
faCheckCircle,
faClock,
@@ -80,8 +80,6 @@ export function useInvocationGraph(
workflowId: Ref<string | undefined>,
workflowVersion: Ref<number | undefined>,
) {
library.add(faCheckCircle, faClock, faExclamationTriangle, faForward, faPause, faSpinner, faTrash);
const steps = ref<{ [index: string]: GraphStep }>({});
const stepsPopulated = ref(false);
const storeId = computed(() => `invocation-${invocation.value.id}`);