mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Implement import of all SVG icons as assets in new frontend, second step
This commit is contained in:
parent
bc3f18ae87
commit
f40ec2fe5f
@ -8,16 +8,16 @@ import { aliases } from 'vuetify/iconsets/mdi-svg'
|
||||
import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n'
|
||||
|
||||
import CustomIcons from '#assets/icons'
|
||||
import CustomIcon from '#assets/icons/svgComponents/glass.vue'
|
||||
// import CustomIcon from '#assets/icons/svgComponents/glass.vue'
|
||||
|
||||
console.log('aliases: ', aliases)
|
||||
console.log('CustomIcons.glass: ', CustomIcons.glass.default)
|
||||
console.log('CustomIcon: ', CustomIcon)
|
||||
// console.log('aliases: ', aliases)
|
||||
// console.log('CustomIcons.glass: ', CustomIcons.glass.default)
|
||||
// console.log('CustomIcon: ', CustomIcon)
|
||||
|
||||
const aliasesCustom: IconAliases = {
|
||||
...aliases,
|
||||
// glass: CustomIcon,
|
||||
glass: CustomIcons.glass.default as never,
|
||||
// glass: CustomIcons.glass.default as never,
|
||||
// ...CustomIcons,
|
||||
}
|
||||
|
||||
@ -30,10 +30,12 @@ const aliasesCustom: IconAliases = {
|
||||
// // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
// aliasesCustom[component.iconName] = component.mod
|
||||
// }
|
||||
// Object.entries(CustomIcons).forEach(([key, module]) => {
|
||||
// // aliasesCustom[key] = module as IconValue
|
||||
// aliasesCustom = { ...aliasesCustom, [key]: module }
|
||||
// })
|
||||
Object.entries(CustomIcons).forEach(([key, value]) => {
|
||||
// aliasesCustom[key] = module as never
|
||||
Object.assign(aliasesCustom, { [key]: value.default as never })
|
||||
})
|
||||
|
||||
console.log('aliasesCustom: ', aliasesCustom)
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export default (i18n: I18n<any, NonNullable<unknown>, NonNullable<unknown>, string, false>) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user