@@ -2413,9 +2413,11 @@ function showRenameNestModal(nestId, currentName, currentLogo, currentDescriptio
24132413 const overlay = $a ( '#admin-modal-overlay' ) ;
24142414 if ( ! content || ! overlay ) return ;
24152415
2416- const isSvg = currentLogo && currentLogo . startsWith ( 'si:' ) ;
2417- const initialType = isSvg ? 'svg' : 'url' ;
2418- const initialSvgSlug = isSvg ? currentLogo . slice ( 3 ) : '' ;
2416+ const isLucide = currentLogo && currentLogo . startsWith ( 'lucide:' ) ;
2417+ const isSi = currentLogo && currentLogo . startsWith ( 'si:' ) ;
2418+ const isIcon = isLucide || isSi ;
2419+ const initialType = isIcon ? 'svg' : 'url' ;
2420+ const initialSvgSlug = isLucide ? currentLogo . slice ( 7 ) : isSi ? currentLogo . slice ( 3 ) : '' ;
24192421
24202422 content . innerHTML = ahtml `
24212423 <div>
@@ -2437,12 +2439,12 @@ function showRenameNestModal(nestId, currentName, currentLogo, currentDescriptio
24372439 </div>
24382440 </div>
24392441 <div id="nest-logo-svg-section" style="display:${ initialType === 'svg' ? 'block' : 'none' } ">
2440- <div id="nest-svg -picker" class="svg-picker">
2442+ <div id="nest-lucide -picker" class="svg-picker">
24412443 <input type="text" class="svg-picker-search" placeholder="Search icons..." />
2442- <div class="svg-picker-grid">${ renderSvgPickerGrid ( initialSvgSlug ) } </div>
2444+ <div class="svg-picker-grid">${ renderLucidePickerGrid ( initialSvgSlug ) } </div>
24432445 </div>
2444- <div id="nest-svg -selected-preview" class="logo-preview-box" style="display:${ initialSvgSlug ? 'flex' : 'none' } ">
2445- <img src ="${ initialSvgSlug ? siUrl ( initialSvgSlug ) : '' } " alt="" / >
2446+ <div id="nest-lucide -selected-preview" class="logo-preview-box" style="display:${ initialSvgSlug ? 'flex' : 'none' } ">
2447+ <i data-lucide ="${ initialSvgSlug || '' } " style="width:32px;height:32px"></i >
24462448 <span class="logo-preview-label">${ initialSvgSlug || '' } </span>
24472449 <button type="button" class="logo-preview-clear" id="nest-svg-clear"><i data-lucide="x" style="width:14px;height:14px"></i></button>
24482450 </div>
@@ -2465,16 +2467,19 @@ function showRenameNestModal(nestId, currentName, currentLogo, currentDescriptio
24652467 initIcons ( ) ;
24662468
24672469 ( async ( ) => {
2468- const grid = $a ( '#nest-svg -picker .svg-picker-grid' ) ;
2470+ const grid = $a ( '#nest-lucide -picker .svg-picker-grid' ) ;
24692471 if ( grid ) {
2470- grid . innerHTML = await renderSvgPickerGridLoaded ( initialSvgSlug ) ;
2471- initSvgPickerListeners ( $a ( '#nest-svg-picker' ) , ( slug ) => {
2472- $a ( '#modal-edit-nest-svg-slug' ) . value = slug ;
2473- const prev = $a ( '#nest-svg-selected-preview' ) ;
2472+ grid . innerHTML = await renderLucidePickerGridLoaded ( initialSvgSlug ) ;
2473+ if ( window . lucide ) lucide . createIcons ( { nodes : [ grid ] } ) ;
2474+ initSvgPickerListeners ( $a ( '#nest-lucide-picker' ) , ( name ) => {
2475+ $a ( '#modal-edit-nest-svg-slug' ) . value = name ;
2476+ const prev = $a ( '#nest-lucide-selected-preview' ) ;
24742477 if ( prev ) {
24752478 prev . style . display = 'flex' ;
2476- prev . querySelector ( 'img' ) . src = siUrl ( slug ) ;
2477- prev . querySelector ( '.logo-preview-label' ) . textContent = slug ;
2479+ const iconEl = prev . querySelector ( '[data-lucide]' ) ;
2480+ if ( iconEl ) { iconEl . setAttribute ( 'data-lucide' , name ) ; }
2481+ prev . querySelector ( '.logo-preview-label' ) . textContent = name ;
2482+ if ( window . lucide ) lucide . createIcons ( { nodes : [ prev ] } ) ;
24782483 }
24792484 } ) ;
24802485 }
@@ -2506,9 +2511,9 @@ function showRenameNestModal(nestId, currentName, currentLogo, currentDescriptio
25062511
25072512 $a ( '#nest-svg-clear' ) ?. addEventListener ( 'click' , ( ) => {
25082513 $a ( '#modal-edit-nest-svg-slug' ) . value = '' ;
2509- const prev = $a ( '#nest-svg -selected-preview' ) ;
2514+ const prev = $a ( '#nest-lucide -selected-preview' ) ;
25102515 if ( prev ) prev . style . display = 'none' ;
2511- $a ( '#nest-svg -picker' ) ?. querySelectorAll ( '.svg-picker-item' ) . forEach ( i => i . classList . remove ( 'selected' ) ) ;
2516+ $a ( '#nest-lucide -picker' ) ?. querySelectorAll ( '.svg-picker-item' ) . forEach ( i => i . classList . remove ( 'selected' ) ) ;
25122517 } ) ;
25132518
25142519 $a ( '#btn-confirm-rename-nest' ) ?. addEventListener ( 'click' , async ( ) => {
@@ -2517,7 +2522,7 @@ function showRenameNestModal(nestId, currentName, currentLogo, currentDescriptio
25172522 let logo = null ;
25182523 if ( type === 'svg' ) {
25192524 const slug = $a ( '#modal-edit-nest-svg-slug' ) . value . trim ( ) ;
2520- logo = slug ? `si :${ slug } ` : null ;
2525+ logo = slug ? `lucide :${ slug } ` : null ;
25212526 } else {
25222527 logo = $a ( '#modal-edit-nest-logo' ) . value . trim ( ) || null ;
25232528 }
0 commit comments