fix(admin): map Winter icon-* names onto lucide for plugin navigation
Ported plugins send Winter icon-* class names on nav and settings; the SPA never loads Font Awesome, so unknown names rendered as empty squares. Map BM Studies, Quizzes, icon-pencil, and a closed Winter backend alias table onto named @lucide/vue 1.17.0 exports, keep Square for unknown names, and rebuild the embedded boardwalk dist.
This commit is contained in:
@@ -9,39 +9,98 @@ import {
|
|||||||
ArrowRight,
|
ArrowRight,
|
||||||
ArrowUp,
|
ArrowUp,
|
||||||
ArrowUpRight,
|
ArrowUpRight,
|
||||||
|
Bell,
|
||||||
|
Book,
|
||||||
|
Bookmark,
|
||||||
|
Box,
|
||||||
|
Briefcase,
|
||||||
|
Building,
|
||||||
|
Calendar,
|
||||||
|
Camera,
|
||||||
CassetteTape,
|
CassetteTape,
|
||||||
|
ChartBar,
|
||||||
Check,
|
Check,
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
Circle,
|
Circle,
|
||||||
CircleAlert,
|
CircleAlert,
|
||||||
|
CircleCheck,
|
||||||
|
CircleQuestionMark,
|
||||||
|
ClipboardList,
|
||||||
|
Clock,
|
||||||
|
Cloud,
|
||||||
|
Code,
|
||||||
|
Copy,
|
||||||
|
CreditCard,
|
||||||
|
Database,
|
||||||
Disc,
|
Disc,
|
||||||
Disc3,
|
Disc3,
|
||||||
|
Download,
|
||||||
|
ExternalLink,
|
||||||
|
File,
|
||||||
|
FileText,
|
||||||
|
Files,
|
||||||
|
Flag,
|
||||||
|
Folder,
|
||||||
|
Funnel,
|
||||||
|
Gauge,
|
||||||
|
Globe,
|
||||||
|
GraduationCap,
|
||||||
|
Heart,
|
||||||
|
House,
|
||||||
Image,
|
Image,
|
||||||
|
Inbox,
|
||||||
|
Info,
|
||||||
|
Key,
|
||||||
|
Languages,
|
||||||
|
LayoutGrid,
|
||||||
|
Leaf,
|
||||||
Library,
|
Library,
|
||||||
|
LifeBuoy,
|
||||||
|
Link,
|
||||||
List,
|
List,
|
||||||
|
ListOrdered,
|
||||||
|
Lock,
|
||||||
LogOut,
|
LogOut,
|
||||||
|
Mail,
|
||||||
|
MapPin,
|
||||||
|
MessageCircle,
|
||||||
MicVocal,
|
MicVocal,
|
||||||
Minus,
|
Minus,
|
||||||
|
Network,
|
||||||
Palette,
|
Palette,
|
||||||
PanelLeftClose,
|
PanelLeftClose,
|
||||||
PanelLeftOpen,
|
PanelLeftOpen,
|
||||||
|
Paperclip,
|
||||||
|
Pause,
|
||||||
|
Pencil,
|
||||||
|
Phone,
|
||||||
|
Play,
|
||||||
Plus,
|
Plus,
|
||||||
Puzzle,
|
Puzzle,
|
||||||
|
RefreshCw,
|
||||||
Search,
|
Search,
|
||||||
SearchX,
|
SearchX,
|
||||||
Settings,
|
Settings,
|
||||||
ShieldCheck,
|
ShieldCheck,
|
||||||
|
ShoppingCart,
|
||||||
Square,
|
Square,
|
||||||
|
Star,
|
||||||
Sun,
|
Sun,
|
||||||
|
Table,
|
||||||
Tags,
|
Tags,
|
||||||
Trash2,
|
Trash2,
|
||||||
|
TriangleAlert,
|
||||||
|
Trophy,
|
||||||
|
Upload,
|
||||||
User,
|
User,
|
||||||
UserMinus,
|
UserMinus,
|
||||||
UserPlus,
|
UserPlus,
|
||||||
Users,
|
Users,
|
||||||
UsersRound,
|
UsersRound,
|
||||||
|
WandSparkles,
|
||||||
|
Wrench,
|
||||||
X,
|
X,
|
||||||
} from '@lucide/vue'
|
} from '@lucide/vue'
|
||||||
|
|
||||||
@@ -52,51 +111,193 @@ export const icons: Readonly<Record<string, Component>> = {
|
|||||||
'arrow-right': ArrowRight,
|
'arrow-right': ArrowRight,
|
||||||
'arrow-up': ArrowUp,
|
'arrow-up': ArrowUp,
|
||||||
'arrow-up-right': ArrowUpRight,
|
'arrow-up-right': ArrowUpRight,
|
||||||
|
bell: Bell,
|
||||||
|
book: Book,
|
||||||
|
bookmark: Bookmark,
|
||||||
|
box: Box,
|
||||||
|
briefcase: Briefcase,
|
||||||
|
building: Building,
|
||||||
|
calendar: Calendar,
|
||||||
|
camera: Camera,
|
||||||
'cassette-tape': CassetteTape,
|
'cassette-tape': CassetteTape,
|
||||||
|
'chart-bar': ChartBar,
|
||||||
check: Check,
|
check: Check,
|
||||||
'chevron-down': ChevronDown,
|
'chevron-down': ChevronDown,
|
||||||
'chevron-left': ChevronLeft,
|
'chevron-left': ChevronLeft,
|
||||||
'chevron-right': ChevronRight,
|
'chevron-right': ChevronRight,
|
||||||
circle: Circle,
|
circle: Circle,
|
||||||
'circle-alert': CircleAlert,
|
'circle-alert': CircleAlert,
|
||||||
|
'circle-check': CircleCheck,
|
||||||
|
'circle-question-mark': CircleQuestionMark,
|
||||||
|
'clipboard-list': ClipboardList,
|
||||||
|
clock: Clock,
|
||||||
|
cloud: Cloud,
|
||||||
|
code: Code,
|
||||||
|
copy: Copy,
|
||||||
|
'credit-card': CreditCard,
|
||||||
|
database: Database,
|
||||||
disc: Disc,
|
disc: Disc,
|
||||||
'disc-3': Disc3,
|
'disc-3': Disc3,
|
||||||
|
download: Download,
|
||||||
|
'external-link': ExternalLink,
|
||||||
|
file: File,
|
||||||
|
'file-text': FileText,
|
||||||
|
files: Files,
|
||||||
|
flag: Flag,
|
||||||
|
folder: Folder,
|
||||||
|
funnel: Funnel,
|
||||||
|
gauge: Gauge,
|
||||||
|
globe: Globe,
|
||||||
|
'graduation-cap': GraduationCap,
|
||||||
|
heart: Heart,
|
||||||
|
house: House,
|
||||||
image: Image,
|
image: Image,
|
||||||
|
inbox: Inbox,
|
||||||
|
info: Info,
|
||||||
|
key: Key,
|
||||||
|
languages: Languages,
|
||||||
|
'layout-grid': LayoutGrid,
|
||||||
|
leaf: Leaf,
|
||||||
library: Library,
|
library: Library,
|
||||||
|
'life-buoy': LifeBuoy,
|
||||||
|
link: Link,
|
||||||
list: List,
|
list: List,
|
||||||
|
'list-ordered': ListOrdered,
|
||||||
|
lock: Lock,
|
||||||
'log-out': LogOut,
|
'log-out': LogOut,
|
||||||
|
mail: Mail,
|
||||||
|
'map-pin': MapPin,
|
||||||
|
'message-circle': MessageCircle,
|
||||||
'mic-vocal': MicVocal,
|
'mic-vocal': MicVocal,
|
||||||
minus: Minus,
|
minus: Minus,
|
||||||
|
network: Network,
|
||||||
palette: Palette,
|
palette: Palette,
|
||||||
'panel-left-close': PanelLeftClose,
|
'panel-left-close': PanelLeftClose,
|
||||||
'panel-left-open': PanelLeftOpen,
|
'panel-left-open': PanelLeftOpen,
|
||||||
|
paperclip: Paperclip,
|
||||||
|
pause: Pause,
|
||||||
|
pencil: Pencil,
|
||||||
|
phone: Phone,
|
||||||
|
play: Play,
|
||||||
plus: Plus,
|
plus: Plus,
|
||||||
puzzle: Puzzle,
|
puzzle: Puzzle,
|
||||||
|
'refresh-cw': RefreshCw,
|
||||||
search: Search,
|
search: Search,
|
||||||
'search-x': SearchX,
|
'search-x': SearchX,
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
'shield-check': ShieldCheck,
|
'shield-check': ShieldCheck,
|
||||||
|
'shopping-cart': ShoppingCart,
|
||||||
|
star: Star,
|
||||||
sun: Sun,
|
sun: Sun,
|
||||||
|
table: Table,
|
||||||
tags: Tags,
|
tags: Tags,
|
||||||
'trash-2': Trash2,
|
'trash-2': Trash2,
|
||||||
|
'triangle-alert': TriangleAlert,
|
||||||
|
trophy: Trophy,
|
||||||
|
upload: Upload,
|
||||||
user: User,
|
user: User,
|
||||||
'user-minus': UserMinus,
|
'user-minus': UserMinus,
|
||||||
'user-plus': UserPlus,
|
'user-plus': UserPlus,
|
||||||
users: Users,
|
users: Users,
|
||||||
'users-round': UsersRound,
|
'users-round': UsersRound,
|
||||||
|
'wand-sparkles': WandSparkles,
|
||||||
|
wrench: Wrench,
|
||||||
x: X,
|
x: X,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Winter backend icon classes mapped to lucide names. */
|
/** Winter backend icon classes mapped to lucide names. */
|
||||||
export const winterIcons: Readonly<Record<string, string>> = {
|
export const winterIcons: Readonly<Record<string, string>> = {
|
||||||
'icon-archive': 'archive',
|
'icon-archive': 'archive',
|
||||||
|
'icon-bar-chart': 'chart-bar',
|
||||||
|
'icon-bell': 'bell',
|
||||||
|
'icon-book': 'book',
|
||||||
|
'icon-bookmark': 'bookmark',
|
||||||
|
'icon-briefcase': 'briefcase',
|
||||||
|
'icon-building': 'building',
|
||||||
|
'icon-calendar': 'calendar',
|
||||||
|
'icon-camera': 'camera',
|
||||||
|
'icon-check': 'check',
|
||||||
|
'icon-check-circle': 'circle-check',
|
||||||
'icon-circle': 'circle',
|
'icon-circle': 'circle',
|
||||||
'icon-list-ul': 'list',
|
'icon-clock': 'clock',
|
||||||
'icon-tags': 'tags',
|
'icon-clock-o': 'clock',
|
||||||
'icon-user': 'user',
|
'icon-cloud': 'cloud',
|
||||||
'icon-search': 'search',
|
'icon-code': 'code',
|
||||||
'icon-cog': 'settings',
|
'icon-cog': 'settings',
|
||||||
|
'icon-cogs': 'settings',
|
||||||
|
'icon-comment': 'message-circle',
|
||||||
|
'icon-comments': 'message-circle',
|
||||||
|
'icon-comments-o': 'message-circle',
|
||||||
|
'icon-copy': 'copy',
|
||||||
|
'icon-credit-card': 'credit-card',
|
||||||
|
'icon-cube': 'box',
|
||||||
|
'icon-dashboard': 'gauge',
|
||||||
|
'icon-database': 'database',
|
||||||
|
'icon-download': 'download',
|
||||||
|
'icon-edit': 'pencil',
|
||||||
|
'icon-envelope': 'mail',
|
||||||
|
'icon-envelope-o': 'mail',
|
||||||
|
'icon-exclamation-triangle': 'triangle-alert',
|
||||||
|
'icon-external-link': 'external-link',
|
||||||
|
'icon-file': 'file',
|
||||||
|
'icon-file-o': 'file',
|
||||||
|
'icon-file-text': 'file-text',
|
||||||
|
'icon-file-text-o': 'file-text',
|
||||||
|
'icon-files-o': 'files',
|
||||||
|
'icon-filter': 'funnel',
|
||||||
|
'icon-flag': 'flag',
|
||||||
|
'icon-folder': 'folder',
|
||||||
|
'icon-folder-o': 'folder',
|
||||||
|
'icon-globe': 'globe',
|
||||||
|
'icon-graduation-cap': 'graduation-cap',
|
||||||
|
'icon-group': 'users',
|
||||||
|
'icon-heart': 'heart',
|
||||||
|
'icon-home': 'house',
|
||||||
|
'icon-inbox': 'inbox',
|
||||||
|
'icon-info-circle': 'info',
|
||||||
|
'icon-key': 'key',
|
||||||
|
'icon-language': 'languages',
|
||||||
|
'icon-leaf': 'leaf',
|
||||||
|
'icon-life-ring': 'life-buoy',
|
||||||
|
'icon-link': 'link',
|
||||||
|
'icon-list': 'list',
|
||||||
|
'icon-list-alt': 'clipboard-list',
|
||||||
|
'icon-list-ol': 'list-ordered',
|
||||||
|
'icon-list-ul': 'list',
|
||||||
|
'icon-lock': 'lock',
|
||||||
|
'icon-magic': 'wand-sparkles',
|
||||||
|
'icon-map-marker': 'map-pin',
|
||||||
|
'icon-minus': 'minus',
|
||||||
|
'icon-paperclip': 'paperclip',
|
||||||
|
'icon-pause': 'pause',
|
||||||
|
'icon-pencil': 'pencil',
|
||||||
|
'icon-phone': 'phone',
|
||||||
|
'icon-photo': 'image',
|
||||||
|
'icon-picture-o': 'image',
|
||||||
|
'icon-play': 'play',
|
||||||
|
'icon-plus': 'plus',
|
||||||
|
'icon-question': 'circle-question-mark',
|
||||||
|
'icon-question-circle': 'circle-question-mark',
|
||||||
|
'icon-refresh': 'refresh-cw',
|
||||||
|
'icon-search': 'search',
|
||||||
|
'icon-shopping-cart': 'shopping-cart',
|
||||||
|
'icon-sign-out': 'log-out',
|
||||||
|
'icon-sitemap': 'network',
|
||||||
|
'icon-star': 'star',
|
||||||
|
'icon-table': 'table',
|
||||||
|
'icon-tachometer': 'gauge',
|
||||||
|
'icon-tags': 'tags',
|
||||||
|
'icon-th': 'layout-grid',
|
||||||
|
'icon-th-large': 'layout-grid',
|
||||||
|
'icon-times': 'x',
|
||||||
|
'icon-trash': 'trash-2',
|
||||||
|
'icon-trash-o': 'trash-2',
|
||||||
|
'icon-trophy': 'trophy',
|
||||||
|
'icon-upload': 'upload',
|
||||||
|
'icon-user': 'user',
|
||||||
'icon-users': 'users',
|
'icon-users': 'users',
|
||||||
|
'icon-warning': 'triangle-alert',
|
||||||
|
'icon-wrench': 'wrench',
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Neutral icon for names neither lucide map knows. */
|
/** Neutral icon for names neither lucide map knows. */
|
||||||
|
|||||||
@@ -1,5 +1,28 @@
|
|||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
import { Archive, Disc3, Settings, Square, Tags } from '@lucide/vue'
|
import {
|
||||||
|
Archive,
|
||||||
|
Book,
|
||||||
|
Bookmark,
|
||||||
|
Calendar,
|
||||||
|
CircleQuestionMark,
|
||||||
|
Clock,
|
||||||
|
Copy,
|
||||||
|
Disc3,
|
||||||
|
FileText,
|
||||||
|
Flag,
|
||||||
|
GraduationCap,
|
||||||
|
House,
|
||||||
|
Leaf,
|
||||||
|
LifeBuoy,
|
||||||
|
List,
|
||||||
|
Mail,
|
||||||
|
Network,
|
||||||
|
Pencil,
|
||||||
|
Settings,
|
||||||
|
Square,
|
||||||
|
Tags,
|
||||||
|
WandSparkles,
|
||||||
|
} from '@lucide/vue'
|
||||||
import { fallbackIcon, iconFor, icons, winterIcons } from '../../src/app/icons'
|
import { fallbackIcon, iconFor, icons, winterIcons } from '../../src/app/icons'
|
||||||
|
|
||||||
describe('iconFor', () => {
|
describe('iconFor', () => {
|
||||||
@@ -7,11 +30,33 @@ describe('iconFor', () => {
|
|||||||
expect(iconFor('disc-3')).toBe(Disc3)
|
expect(iconFor('disc-3')).toBe(Disc3)
|
||||||
expect(iconFor('tags')).toBe(Tags)
|
expect(iconFor('tags')).toBe(Tags)
|
||||||
expect(iconFor(' tags ')).toBe(Tags)
|
expect(iconFor(' tags ')).toBe(Tags)
|
||||||
|
expect(iconFor('book')).toBe(Book)
|
||||||
|
expect(iconFor(' graduation-cap ')).toBe(GraduationCap)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('resolves Winter icon aliases', () => {
|
it('resolves Winter icon aliases', () => {
|
||||||
expect(iconFor('icon-archive')).toBe(Archive)
|
expect(iconFor('icon-archive')).toBe(Archive)
|
||||||
expect(iconFor('icon-cog')).toBe(Settings)
|
expect(iconFor('icon-cog')).toBe(Settings)
|
||||||
|
expect(iconFor('icon-graduation-cap')).toBe(GraduationCap)
|
||||||
|
expect(iconFor('icon-book')).toBe(Book)
|
||||||
|
expect(iconFor('icon-bookmark')).toBe(Bookmark)
|
||||||
|
expect(iconFor('icon-calendar')).toBe(Calendar)
|
||||||
|
expect(iconFor('icon-clock-o')).toBe(Clock)
|
||||||
|
expect(iconFor('icon-flag')).toBe(Flag)
|
||||||
|
expect(iconFor('icon-file-text-o')).toBe(FileText)
|
||||||
|
expect(iconFor('icon-tags')).toBe(Tags)
|
||||||
|
expect(iconFor('icon-pencil')).toBe(Pencil)
|
||||||
|
expect(iconFor('icon-question-circle')).toBe(CircleQuestionMark)
|
||||||
|
expect(iconFor('icon-list')).toBe(List)
|
||||||
|
expect(iconFor('icon-home')).toBe(House)
|
||||||
|
expect(iconFor('icon-magic')).toBe(WandSparkles)
|
||||||
|
expect(iconFor('icon-life-ring')).toBe(LifeBuoy)
|
||||||
|
expect(iconFor('icon-sitemap')).toBe(Network)
|
||||||
|
expect(iconFor('icon-envelope-o')).toBe(Mail)
|
||||||
|
expect(iconFor('icon-copy')).toBe(Copy)
|
||||||
|
expect(iconFor('icon-leaf')).toBe(Leaf)
|
||||||
|
expect(iconFor('icon-cogs')).toBe(Settings)
|
||||||
|
expect(iconFor('icon-edit')).toBe(Pencil)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('falls back to the neutral square for unknown, empty or missing names', () => {
|
it('falls back to the neutral square for unknown, empty or missing names', () => {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
9
modules/boardwalk/dist/assets/index-z_LzMU8D.js
vendored
Normal file
9
modules/boardwalk/dist/assets/index-z_LzMU8D.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
modules/boardwalk/dist/index.html
vendored
2
modules/boardwalk/dist/index.html
vendored
@@ -6,7 +6,7 @@
|
|||||||
<meta name="robots" content="noindex, nofollow" />
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<meta name="summer-admin-base" content="__SUMMER_ADMIN_BASE__" />
|
<meta name="summer-admin-base" content="__SUMMER_ADMIN_BASE__" />
|
||||||
<title>SummerCMS</title>
|
<title>SummerCMS</title>
|
||||||
<script type="module" crossorigin src="./assets/index-CbohsCp4.js"></script>
|
<script type="module" crossorigin src="./assets/index-z_LzMU8D.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-CqzF_Nki.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-CqzF_Nki.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user