Skip to content

Commit

Permalink
🔨 Moving icons logic to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Dec 27, 2024
1 parent 33d729a commit 148dc04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/editor-ui/src/plugins/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,7 @@ type LibraryWithDefinitions = Library & {
};

export const iconLibrary = library as LibraryWithDefinitions;

export const getAllIconNames = () => {
return Object.keys(iconLibrary.definitions.fas);
};
4 changes: 2 additions & 2 deletions packages/editor-ui/src/views/ProjectSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useTelemetry } from '@/composables/useTelemetry';
import { useDocumentTitle } from '@/composables/useDocumentTitle';
import ProjectHeader from '@/components/Projects/ProjectHeader.vue';
import { iconLibrary } from '@/plugins/icons';
import { getAllIconNames } from '@/plugins/icons';
type FormDataDiff = {
name?: string;
Expand Down Expand Up @@ -55,7 +55,7 @@ const projectRoleTranslations = ref<{ [key: string]: string }>({
});
const nameInput = ref<InstanceType<typeof N8nFormInput> | null>(null);
const availableProjectIcons: string[] = Object.keys(iconLibrary.definitions.fas);
const availableProjectIcons: string[] = getAllIconNames();
const projectIcon = ref<ProjectIcon>({
type: 'icon',
Expand Down

0 comments on commit 148dc04

Please sign in to comment.