(scanners)
| 20209 | const clickAttr = encodedPath ? `onclick="openLootFile('${encodedPath}')"` : 'disabled aria-disabled="true"'; |
| 20210 | const actionHint = encodedPath ? '<p class="text-xs text-Ragnar-400 mt-3">Open in Files →</p>' : ''; |
| 20211 | |
| 20212 | return ` |
| 20213 | <button type="button" class="${buttonClasses}" ${clickAttr}> |
| 20214 | <div class="flex items-center justify-between mb-2"> |
| 20215 | <h3 class="text-lg font-semibold text-Ragnar-400 truncate" title="${filename}">${filename}</h3> |
| 20216 | <span class="text-xs text-gray-400 ml-2">${size}</span> |
| 20217 | </div> |
| 20218 | <div class="space-y-2 text-sm text-gray-300"> |
| 20219 | <p><span class="text-gray-400">Source:</span> ${source}</p> |
| 20220 | <p><span class="text-gray-400">Timestamp:</span> ${timestamp}</p> |
| 20221 | </div> |
| 20222 | ${actionHint} |
| 20223 | </button> |
| 20224 | `; |
| 20225 | } |
| 20226 | |
| 20227 | let html = `<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" id="loot-preview-items">`; |
| 20228 | |
| 20229 | // Add preview items |
| 20230 | previewItems.forEach(item => { |
| 20231 | html += createLootItemHTML(item); |
| 20232 | }); |
| 20233 | |
| 20234 | html += '</div>'; |
| 20235 | |
| 20236 | // Add expandable section for remaining items |
| 20237 | if (hasMoreItems) { |
| 20238 | html += ` |
| 20239 | <div class="mt-4"> |
| 20240 | <button onclick="toggleLootExpansion()" |
| 20241 | class="flex items-center justify-center w-full py-3 px-4 bg-gray-800 hover:bg-gray-700 rounded-lg transition-colors text-gray-300 hover:text-white"> |
| 20242 | <span id="loot-expand-text">Show ${hiddenItems.length} more items</span> |
| 20243 | <svg id="loot-expand-arrow" class="w-4 h-4 ml-2 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 20244 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> |
| 20245 | </svg> |
| 20246 | </button> |
| 20247 | <div id="loot-hidden-items" class="hidden mt-4"> |
| 20248 | <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> |
| 20249 | `; |
| 20250 | |
| 20251 | hiddenItems.forEach(item => { |
| 20252 | html += createLootItemHTML(item); |
| 20253 | }); |
| 20254 |
no test coverage detected