initializeDesktopIcons.ts 575 B

1234567891011121314151617
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { injectSvgIcons } from '#shared/components/CommonIcon/injectIcons.ts'
  3. import { provideIcons } from '#shared/components/CommonIcon/useIcons.ts'
  4. import iconsAliases from './desktopIconsAliasesMap.ts'
  5. const iconsSymbolsList = Object.entries(
  6. import.meta.glob<{ default: string }>('./assets/*.svg', {
  7. eager: true,
  8. query: '?symbol',
  9. }),
  10. )
  11. export const initializeDesktopIcons = () => {
  12. const { symbols } = provideIcons(iconsSymbolsList, iconsAliases)
  13. injectSvgIcons(symbols)
  14. }