From 4a94380b5fe947b657dadd250e1960865ca3285e Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Tue, 6 Oct 2026 23:58:44 +0200 Subject: [PATCH] fix: use sun as default admin icon --- admin/src/app/icons.ts | 5 ++--- admin/tests/app/icons.test.ts | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/admin/src/app/icons.ts b/admin/src/app/icons.ts index a5efd78..658651d 100644 --- a/admin/src/app/icons.ts +++ b/admin/src/app/icons.ts @@ -85,7 +85,6 @@ import { Settings, ShieldCheck, ShoppingCart, - Square, Star, Sun, Table, @@ -300,8 +299,8 @@ export const winterIcons: Readonly> = { 'icon-wrench': 'wrench', } -/** Neutral icon for names neither lucide map knows. */ -export const fallbackIcon: Component = Square +/** Brand icon for names neither lucide map knows. */ +export const fallbackIcon: Component = Sun /** An own entry of a map: names come from the server, so inherited object * members such as "constructor" or "toString" never count as icons. */ diff --git a/admin/tests/app/icons.test.ts b/admin/tests/app/icons.test.ts index 05cef82..815d543 100644 --- a/admin/tests/app/icons.test.ts +++ b/admin/tests/app/icons.test.ts @@ -19,7 +19,7 @@ import { Network, Pencil, Settings, - Square, + Sun, Tags, WandSparkles, } from '@lucide/vue' @@ -59,16 +59,16 @@ describe('iconFor', () => { expect(iconFor('icon-edit')).toBe(Pencil) }) - it('falls back to the neutral square for unknown, empty or missing names', () => { - expect(fallbackIcon).toBe(Square) - expect(iconFor('unknown-icon-name')).toBe(Square) - expect(iconFor('icon-unknown')).toBe(Square) - expect(iconFor('')).toBe(Square) - expect(iconFor(null)).toBe(Square) - expect(iconFor(undefined)).toBe(Square) - expect(iconFor('constructor')).toBe(Square) - expect(iconFor('toString')).toBe(Square) - expect(iconFor('__proto__')).toBe(Square) + it('falls back to the sun for unknown, empty or missing names', () => { + expect(fallbackIcon).toBe(Sun) + expect(iconFor('unknown-icon-name')).toBe(Sun) + expect(iconFor('icon-unknown')).toBe(Sun) + expect(iconFor('')).toBe(Sun) + expect(iconFor(null)).toBe(Sun) + expect(iconFor(undefined)).toBe(Sun) + expect(iconFor('constructor')).toBe(Sun) + expect(iconFor('toString')).toBe(Sun) + expect(iconFor('__proto__')).toBe(Sun) }) it('maps every Winter alias onto a registered lucide icon', () => {