fix: use sun as default admin icon
This commit is contained in:
@@ -85,7 +85,6 @@ import {
|
|||||||
Settings,
|
Settings,
|
||||||
ShieldCheck,
|
ShieldCheck,
|
||||||
ShoppingCart,
|
ShoppingCart,
|
||||||
Square,
|
|
||||||
Star,
|
Star,
|
||||||
Sun,
|
Sun,
|
||||||
Table,
|
Table,
|
||||||
@@ -300,8 +299,8 @@ export const winterIcons: Readonly<Record<string, string>> = {
|
|||||||
'icon-wrench': 'wrench',
|
'icon-wrench': 'wrench',
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Neutral icon for names neither lucide map knows. */
|
/** Brand icon for names neither lucide map knows. */
|
||||||
export const fallbackIcon: Component = Square
|
export const fallbackIcon: Component = Sun
|
||||||
|
|
||||||
/** An own entry of a map: names come from the server, so inherited object
|
/** An own entry of a map: names come from the server, so inherited object
|
||||||
* members such as "constructor" or "toString" never count as icons. */
|
* members such as "constructor" or "toString" never count as icons. */
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
Network,
|
Network,
|
||||||
Pencil,
|
Pencil,
|
||||||
Settings,
|
Settings,
|
||||||
Square,
|
Sun,
|
||||||
Tags,
|
Tags,
|
||||||
WandSparkles,
|
WandSparkles,
|
||||||
} from '@lucide/vue'
|
} from '@lucide/vue'
|
||||||
@@ -59,16 +59,16 @@ describe('iconFor', () => {
|
|||||||
expect(iconFor('icon-edit')).toBe(Pencil)
|
expect(iconFor('icon-edit')).toBe(Pencil)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('falls back to the neutral square for unknown, empty or missing names', () => {
|
it('falls back to the sun for unknown, empty or missing names', () => {
|
||||||
expect(fallbackIcon).toBe(Square)
|
expect(fallbackIcon).toBe(Sun)
|
||||||
expect(iconFor('unknown-icon-name')).toBe(Square)
|
expect(iconFor('unknown-icon-name')).toBe(Sun)
|
||||||
expect(iconFor('icon-unknown')).toBe(Square)
|
expect(iconFor('icon-unknown')).toBe(Sun)
|
||||||
expect(iconFor('')).toBe(Square)
|
expect(iconFor('')).toBe(Sun)
|
||||||
expect(iconFor(null)).toBe(Square)
|
expect(iconFor(null)).toBe(Sun)
|
||||||
expect(iconFor(undefined)).toBe(Square)
|
expect(iconFor(undefined)).toBe(Sun)
|
||||||
expect(iconFor('constructor')).toBe(Square)
|
expect(iconFor('constructor')).toBe(Sun)
|
||||||
expect(iconFor('toString')).toBe(Square)
|
expect(iconFor('toString')).toBe(Sun)
|
||||||
expect(iconFor('__proto__')).toBe(Square)
|
expect(iconFor('__proto__')).toBe(Sun)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('maps every Winter alias onto a registered lucide icon', () => {
|
it('maps every Winter alias onto a registered lucide icon', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user