@@ -92,11 +92,15 @@ export function AppSidebar() {
9292 url : '/' ,
9393 icon : Home ,
9494 } ,
95- {
96- title : '我的收藏' ,
97- url : '/favorites' ,
98- icon : Star ,
99- } ,
95+ ...( session ?. user
96+ ? [
97+ {
98+ title : '我的收藏' ,
99+ url : '/favorites' ,
100+ icon : Star ,
101+ } ,
102+ ]
103+ : [ ] ) ,
100104 ...( isAdminUser
101105 ? [
102106 {
@@ -119,11 +123,15 @@ export function AppSidebar() {
119123 url : '/logs' ,
120124 icon : Eye ,
121125 } ,
122- {
123- title : '我的网站' ,
124- url : '/user/websites' ,
125- icon : FileEdit ,
126- } ,
126+ ...( session ?. user
127+ ? [
128+ {
129+ title : '我的网站' ,
130+ url : '/user/websites' ,
131+ icon : FileEdit ,
132+ } ,
133+ ]
134+ : [ ] ) ,
127135 ]
128136
129137 return (
@@ -157,8 +165,8 @@ export function AppSidebar() {
157165 href = { item . url }
158166 className = { `flex items-center px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 ${
159167 pathname === item . url
160- ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm'
161- : 'text-gray-700 hover:bg-blue-25 hover:text-blue-600 hover:shadow-sm '
168+ ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm hover:bg-blue-100 hover:shadow-md '
169+ : 'text-gray-700 hover:bg-blue-100 hover:text-blue-700 hover:shadow-md hover:scale-105 '
162170 } `}
163171 >
164172 < item . icon className = "h-4 w-4 mr-2" />
@@ -191,8 +199,8 @@ export function AppSidebar() {
191199 href = { `/category/${ category . slug } ` }
192200 className = { `flex items-center px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 ${
193201 pathname === `/category/${ category . slug } `
194- ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm'
195- : 'text-gray-700 hover:bg-blue-25 hover:text-blue-600 hover:shadow-sm '
202+ ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm hover:bg-blue-100 hover:shadow-md '
203+ : 'text-gray-700 hover:bg-blue-100 hover:text-blue-700 hover:shadow-md hover:scale-105 '
196204 } `}
197205 >
198206 { category . icon ? (
@@ -230,8 +238,8 @@ export function AppSidebar() {
230238 href = { item . url }
231239 className = { `flex items-center px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 ${
232240 pathname === item . url
233- ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm'
234- : 'text-gray-700 hover:bg-blue-25 hover:text-blue-600 hover:shadow-sm '
241+ ? 'bg-blue-50 text-blue-700 border border-blue-200 shadow-sm hover:bg-blue-100 hover:shadow-md '
242+ : 'text-gray-700 hover:bg-blue-100 hover:text-blue-700 hover:shadow-md hover:scale-105 '
235243 } `}
236244 >
237245 < item . icon className = "h-4 w-4 mr-2" />
0 commit comments