11import React from "react" ;
2- import { ArrowLeft , Search , AlertCircle , X } from "lucide-react" ;
2+ import { ArrowLeft , Search , AlertCircle , X , Shield } from "lucide-react" ;
33import Footer from "./Footer" ;
44
55interface BlacklistManagementProps {
@@ -24,38 +24,36 @@ const BlacklistManagement: React.FC<BlacklistManagementProps> = ({
2424 onRemoveSite,
2525} ) => {
2626 return (
27- < div className = "flex flex-col min- h-[700px]" >
28- < div className = "flex items-center gap-3 mb-4 " >
27+ < div className = "flex flex-col h-[700px] overflow-hidden " >
28+ < div className = "flex items-center gap-3 mb-6 " >
2929 < button
3030 onClick = { onReturnToMain }
31- className = "p-1 rounded-full hover:bg-neutral-100"
31+ className = "p-1 rounded-full hover:bg-neutral-100 flex items-center justify-center "
3232 >
33- < ArrowLeft size = { 18 } />
33+ < ArrowLeft size = { 24 } />
3434 </ button >
35- < h1 className = "text-xl font-bold" > Manage Excluded Sites</ h1 >
35+ < h1 className = "text-xl font-bold text-neutral-800" >
36+ Manage Excluded Sites
37+ </ h1 >
3638 </ div >
3739
38- < div className = "relative mb-3" >
39- < div className = "absolute left-3 top-1/2 -translate-y-1/2 text-neutral-500" >
40- < Search size = { 15 } />
40+ { /* Current Site Card */ }
41+ < div className = "bg-neutral-100 border-neutral-300 border rounded-xl p-4 hover:border-neutral-400 transition-all mb-4" >
42+ < div className = "flex items-center gap-3 mb-3" >
43+ < div className = "text-neutral-700" >
44+ < Shield size = { 20 } />
45+ </ div >
46+ < div >
47+ < h2 className = "font-semibold text-neutral-800" > Current Site</ h2 >
48+ < p className = "text-sm text-neutral-500 italic" >
49+ Manage current website
50+ </ p >
51+ </ div >
4152 </ div >
42- < input
43- type = "text"
44- className = "w-full pl-9 pr-3 py-2 bg-white border border-neutral-200 rounded-lg text-sm"
45- placeholder = "Search excluded sites..."
46- value = { searchTerm }
47- onChange = { ( e ) => onSearchChange ( e . target . value ) }
48- autoFocus
49- />
50- </ div >
5153
52- < div className = "mb-4" >
53- < h2 className = "text-sm font-medium text-neutral-500 mb-2" >
54- Current Site
55- </ h2 >
5654 < div className = "bg-white rounded-lg border border-neutral-200 p-3 flex justify-between items-center" >
5755 < div className = "flex items-center gap-2" >
58- < div className = "w-5 h-5 bg-neutral-200 rounded-full overflow-hidden" >
56+ < div className = "w-4 h-4 bg-neutral-200 rounded-full overflow-hidden" >
5957 { currentUrl && (
6058 < img
6159 src = { `https://www.google.com/s2/favicons?domain=${ currentUrl } &sz=64` }
@@ -72,34 +70,67 @@ const BlacklistManagement: React.FC<BlacklistManagementProps> = ({
7270 { isCurrentUrlBlacklisted ? (
7371 < button
7472 onClick = { ( ) => onRemoveSite ( currentUrl ) }
75- className = "text-sm px-3 py-1 bg-neutral-200 text-neutral-700 rounded-sm hover:bg-neutral-300 transition-colors"
73+ className = "text-xs px-2 py-1 bg-neutral-200 text-neutral-700 rounded-sm hover:bg-neutral-300 transition-colors"
7674 >
7775 Remove
7876 </ button >
7977 ) : (
8078 < button
8179 onClick = { onAddCurrentSite }
82- className = "text-sm px-3 py-1 bg-neutral-900 text-white rounded-sm hover:bg-neutral-800 transition-colors flex items-center gap-1 "
80+ className = "text-xs px-2 py-1 bg-neutral-900 text-white rounded-sm hover:bg-neutral-800 transition-colors"
8381 >
8482 Exclude
8583 </ button >
8684 ) }
8785 </ div >
8886 </ div >
8987
90- < div className = "flex-1 overflow-hidden flex flex-col min-h-0" >
91- < h2 className = "text-sm font-medium text-neutral-500 mb-2" >
92- All Excluded Sites
93- </ h2 >
94- < div className = "flex-1 overflow-y-auto bg-white rounded-lg border border-neutral-200" >
88+ { /* All Excluded Sites Card */ }
89+ < div className = "bg-neutral-100 border-neutral-300 border rounded-xl p-4 hover:border-neutral-400 transition-all flex-1 flex flex-col min-h-0" >
90+ < div className = "flex items-center gap-3 mb-3" >
91+ < div className = "text-neutral-700" >
92+ < Search size = { 20 } />
93+ </ div >
94+ < div >
95+ < h2 className = "font-semibold text-neutral-800" >
96+ All Excluded Sites
97+ { filteredBlacklist . length > 0 && (
98+ < span className = "ml-2 px-2 py-0.5 text-xs bg-neutral-200 rounded-full" >
99+ { filteredBlacklist . length }
100+ </ span >
101+ ) }
102+ </ h2 >
103+ < p className = "text-sm text-neutral-500 italic" >
104+ Search and manage all excluded sites
105+ </ p >
106+ </ div >
107+ </ div >
108+
109+ { /* Search Bar */ }
110+ < div className = "relative mb-3" >
111+ < div className = "absolute left-3 top-1/2 -translate-y-1/2 text-neutral-500" >
112+ < Search size = { 15 } />
113+ </ div >
114+ < input
115+ type = "text"
116+ className = "w-full pl-9 pr-3 py-2 bg-white border border-neutral-200 rounded-lg text-sm hover:border-neutral-400 transition-all focus:outline-none focus:border-neutral-400"
117+ placeholder = "Search excluded sites..."
118+ value = { searchTerm }
119+ onChange = { ( e ) => onSearchChange ( e . target . value ) }
120+ autoFocus
121+ />
122+ </ div >
123+
124+ { /* Sites List */ }
125+ < div className = "flex-1 overflow-y-auto bg-white rounded-lg border border-neutral-200 min-h-0" >
95126 { filteredBlacklist . length > 0 ? (
96127 filteredBlacklist . map ( ( site ) => (
97128 < div
98129 key = { site }
99- className = "flex justify-between items-center py-3 px-3 border-b border-neutral-200 last:border-0 hover:bg-neutral-50"
130+ className = "flex justify-between items-center py-3 px-3 border-b border-neutral-200 last:border-0 hover:bg-neutral-50 transition-colors "
100131 >
101132 < div className = "flex items-center gap-2" >
102- < div className = "w-5 h-5 bg-neutral-200 rounded-full overflow-hidden" >
133+ < div className = "w-4 h-4 bg-neutral-200 rounded-full overflow-hidden" >
103134 < img
104135 src = { `https://www.google.com/s2/favicons?domain=${ site } &sz=64` }
105136 alt = ""
@@ -110,7 +141,7 @@ const BlacklistManagement: React.FC<BlacklistManagementProps> = ({
110141 </ div >
111142 < button
112143 onClick = { ( ) => onRemoveSite ( site ) }
113- className = "text-neutral-500 hover:text-red-500"
144+ className = "text-neutral-500 hover:text-red-500 transition-colors "
114145 >
115146 < X size = { 15 } />
116147 </ button >
0 commit comments