- {image.is_custom ? (
+ {(() => {
+ const showGenericIcon = image.is_custom && board.slug === 'custom';
+ console.log('[FlashProgress] Image display logic:', {
+ is_custom: image.is_custom,
+ board_slug: board.slug,
+ showGenericIcon,
+ });
+ return showGenericIcon;
+ })() ? (
+ // Generic icon for non-Armbian or undetected custom images
) : (
+ // Board image for detected Armbian custom images OR standard images

{
return invoke('delete_downloaded_image', { imagePath });
}
+export async function deleteDecompressedCustomImage(imagePath: string): Promise
{
+ return invoke('delete_decompressed_custom_image', { imagePath });
+}
+
+/**
+ * Detects board information from custom image filename
+ * Parses Armbian naming convention to extract board slug and match against database
+ *
+ * @param filename - Filename (can include path)
+ * @returns Promise resolving to BoardInfo if detected, null otherwise
+ */
+export async function detectBoardFromFilename(filename: string): Promise {
+ return invoke('detect_board_from_filename', { filename });
+}
+
// Re-export CustomImageInfo for backward compatibility
export type { CustomImageInfo } from '../types';