From 061516c9aeec9e813b9c7398b7a38e1098d47e38 Mon Sep 17 00:00:00 2001 From: Omar Oughriss Date: Mon, 20 Oct 2025 11:58:50 +0200 Subject: [PATCH] Create a centralized icon file and use it --- app/dashboard/layout.tsx | 14 +++-- app/dashboard/page.tsx | 2 +- app/dashboard/settings/page.tsx | 31 ++++++---- lib/icons.ts | 105 ++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 20 deletions(-) create mode 100644 lib/icons.ts diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index dc0f576..49ff5b3 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -8,23 +8,25 @@ import Link from "next/link" import { Button } from "@/components/ui/button" import { Badge } from "@/components/ui/badge" import { - LayoutDashboard, + Shield, FileText, Folder, - Search, Users, Settings, - Shield, - MessageSquare, + Search, + MessageCircle, Bell, + User, LogOut, Menu, X, - TestTube, + ChevronDown, ChevronRight, Home, Key, -} from "lucide-react" + LayoutDashboard, + TestTube, +} from "@/lib/icons" import UserStore from "@/lib/4nk/UserStore" import { iframeUrl } from "../page" import EventBus from "@/lib/4nk/EventBus" diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 1a0eb69..26980f5 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -28,7 +28,7 @@ import { FolderPlus, XCircle, Info, -} from "lucide-react" +} from "@/lib/icons" import MessageBus from "@/lib/4nk/MessageBus" import Link from "next/link" import Chat from "@/components/4nk/Chat" diff --git a/app/dashboard/settings/page.tsx b/app/dashboard/settings/page.tsx index 3731a37..bd334d3 100644 --- a/app/dashboard/settings/page.tsx +++ b/app/dashboard/settings/page.tsx @@ -11,30 +11,35 @@ import { Textarea } from "@/components/ui/textarea" import { Switch } from "@/components/ui/switch" import { User, - Shield, - Bell, - Palette, + Mail, + Phone, + MapPin, + Calendar, Globe, - Database, + Save, + Edit, + Trash2, + Eye, + EyeOff, + Shield, Key, + Bell, + Settings as SettingsIcon, Download, Upload, - Trash2, - Save, RefreshCw, AlertTriangle, CheckCircle, - Eye, - EyeOff, - Copy, - ExternalLink, - HardDrive, - Activity, + XCircle, + Info, Lock, + Unlock, + UserCheck, + Users, Smartphone, Plus, X, -} from "lucide-react" +} from "@/lib/icons" export default function SettingsPage() { const [activeTab, setActiveTab] = useState("profile") diff --git a/lib/icons.ts b/lib/icons.ts new file mode 100644 index 0000000..f96a6e0 --- /dev/null +++ b/lib/icons.ts @@ -0,0 +1,105 @@ +// Centralized icon exports from lucide-react +// This file helps optimize imports and provides a single source of truth for icons + +// Layout & Navigation Icons +export { + Shield, + ArrowLeft, + ArrowRight, + Home, + Menu, + X, + ChevronRight, + ChevronDown, + ChevronUp, + MoreHorizontal, + LayoutDashboard +} from "lucide-react" + +// User & Authentication Icons +export { + Users, + User, + UserCheck, + UserPlus, + Key, + Lock, + Unlock, + LogOut +} from "lucide-react" + +// Document & File Icons +export { + FileText, + File, + Files, + Folder, + FolderOpen, + FolderPlus, + Download, + Upload, + Share2, + Edit, + Copy, + Archive, + FileCheck +} from "lucide-react" + +// Status & Feedback Icons +export { + CheckCircle, + XCircle, + AlertCircle, + AlertTriangle, + Info, + Clock, + Activity, + TrendingUp, + Zap, + ShieldCheck +} from "lucide-react" + +// Action Icons +export { + Plus, + Search, + Settings, + Trash2, + Eye, + EyeOff, + RefreshCw, + Save, + Send, + Filter, + SortAsc, + SortDesc +} from "lucide-react" + +// Technology & Development Icons +export { + Code, + Database, + HardDrive, + Globe, + Monitor, + Smartphone, + TestTube, + Calendar +} from "lucide-react" + +// Formation & Learning Icons +export { + BookOpen, + Award, + GraduationCap +} from "lucide-react" + +// Communication Icons +export { + Mail, + MessageCircle, + Phone, + Video, + Bell, + MapPin +} from "lucide-react"