fix: deduplicate tool icons and add missing icon mappings

7 icons were shared by multiple tools, now each tool has a unique icon:
- favicon: Globe -> AppWindow
- smart-crop: Focus -> Crosshair
- noise-removal: Sparkles -> AudioLines
- beautify: Sparkles -> ImagePlus
- red-eye-removal: Eye -> ScanEye
- color-palette: Palette -> Droplets
- transparency-fixer: Wand2 -> ShieldCheck
- pdf-to-image: FileOutput -> BookImage

2 icons were missing from the ICON_MAP (falling back to generic FileImage):
- Scaling (content-aware-resize)
- Laugh (meme-generator)
This commit is contained in:
SnapOtter
2026-05-09 00:08:24 +08:00
parent e22ffa4ec9
commit 05cb7c940f
2 changed files with 29 additions and 11 deletions
+21 -3
View File
@@ -1,11 +1,16 @@
import type { LucideIcon } from "lucide-react";
import {
AppWindow,
AudioLines,
BookImage,
CheckCircle2,
Code,
Columns,
Columns2,
Copy,
Crop,
Crosshair,
Droplets,
Eraser,
Eye,
EyeOff,
@@ -20,7 +25,9 @@ import {
Globe,
Grid3x3,
Image,
ImagePlus,
Info,
Laugh,
Layers,
LayoutGrid,
Maximize2,
@@ -31,9 +38,12 @@ import {
Pipette,
QrCode,
RotateCw,
Scaling,
ScanEye,
ScanFace,
ScanLine,
ScanText,
ShieldCheck,
ShieldOff,
SlidersHorizontal,
Sparkles,
@@ -52,12 +62,17 @@ import {
// Only the icons actually used by tool definitions in @snapotter/shared constants.
// Avoids `import * as icons from "lucide-react"` which pulls the entire 1000+ icon library.
export const ICON_MAP: Record<string, LucideIcon> = {
AppWindow,
AudioLines,
BookImage,
CheckCircle2,
Code,
Columns,
Columns2,
Copy,
Crop,
Crosshair,
Droplets,
Eraser,
Eye,
EyeOff,
@@ -68,14 +83,15 @@ export const ICON_MAP: Record<string, LucideIcon> = {
FileType,
Film,
Focus,
Frame,
Globe,
Grid3x3,
Image,
ImagePlus,
Info,
LayoutGrid,
Laugh,
Layers,
LayoutGrid,
Maximize2,
Minimize2,
Palette,
@@ -84,9 +100,12 @@ export const ICON_MAP: Record<string, LucideIcon> = {
Pipette,
QrCode,
RotateCw,
Scaling,
ScanEye,
ScanFace,
ScanLine,
ScanText,
ShieldCheck,
ShieldOff,
SlidersHorizontal,
Sparkles,
@@ -97,7 +116,6 @@ export const ICON_MAP: Record<string, LucideIcon> = {
Undo2,
UserCheck,
Wand2,
Wrench,
Zap,
ZoomIn,