From 148dc0437c5d5449700ed7fbe1f0cb17eb18f302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Fri, 27 Dec 2024 11:55:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Moving=20icons=20logic=20to=20pl?= =?UTF-8?q?ugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-ui/src/plugins/icons/index.ts | 4 ++++ packages/editor-ui/src/views/ProjectSettings.vue | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/plugins/icons/index.ts b/packages/editor-ui/src/plugins/icons/index.ts index 880500458fc3d..454f76f2b0722 100644 --- a/packages/editor-ui/src/plugins/icons/index.ts +++ b/packages/editor-ui/src/plugins/icons/index.ts @@ -350,3 +350,7 @@ type LibraryWithDefinitions = Library & { }; export const iconLibrary = library as LibraryWithDefinitions; + +export const getAllIconNames = () => { + return Object.keys(iconLibrary.definitions.fas); +}; diff --git a/packages/editor-ui/src/views/ProjectSettings.vue b/packages/editor-ui/src/views/ProjectSettings.vue index 6a68e741c876b..59ee76b935c6e 100644 --- a/packages/editor-ui/src/views/ProjectSettings.vue +++ b/packages/editor-ui/src/views/ProjectSettings.vue @@ -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; @@ -55,7 +55,7 @@ const projectRoleTranslations = ref<{ [key: string]: string }>({ }); const nameInput = ref | null>(null); -const availableProjectIcons: string[] = Object.keys(iconLibrary.definitions.fas); +const availableProjectIcons: string[] = getAllIconNames(); const projectIcon = ref({ type: 'icon',