@@ -29,17 +29,28 @@ const TYPE_TEXT_COLORS = {
2929 "client-loader" : "text-blue-500" ,
3030 action : "text-yellow-500" ,
3131 "client-action" : "text-purple-500" ,
32+ middleware : "text-orange-500" ,
33+ "client-middleware" : "text-pink-400" ,
3234 "custom-event" : "text-white" ,
3335}
3436
35- type EventType = "loader" | "client-loader" | "action" | "client-action" | "custom-event"
37+ type EventType =
38+ | "loader"
39+ | "client-loader"
40+ | "action"
41+ | "client-action"
42+ | "middleware"
43+ | "client-middleware"
44+ | "custom-event"
3645
3746const EVENT_TYPE_FILTERS : { value : EventType | "all" ; label : string ; color : string } [ ] = [
3847 { value : "all" , label : "All Events" , color : "#ffffff" } ,
3948 { value : "loader" , label : "Loader" , color : "#4ade80" } ,
4049 { value : "client-loader" , label : "Client Loader" , color : "#60a5fa" } ,
41- { value : "action" , label : "Action" , color : "#f59e0b " } ,
50+ { value : "action" , label : "Action" , color : "#FFD700 " } ,
4251 { value : "client-action" , label : "Client Action" , color : "#ef4444" } ,
52+ { value : "middleware" , label : "Middleware" , color : "#FFA500" } ,
53+ { value : "client-middleware" , label : "Client Middleware" , color : "#FF69B4" } ,
4354 { value : "custom-event" , label : "Custom Event" , color : "#ffffff" } ,
4455]
4556
@@ -201,6 +212,7 @@ const NetworkWaterfall: React.FC<Props> = ({ requests, width }) => {
201212 } }
202213 onClick = { ( ) => setActiveTypeFilter ( filter . value ) }
203214 >
215+ < span className = { styles . network . waterfall . filterColorCircle } style = { { backgroundColor : filter . color } } />
204216 { filter . label }
205217 { filter . value !== "all" && (
206218 < span className = { styles . network . waterfall . filterCount } >
@@ -292,7 +304,11 @@ const NetworkWaterfall: React.FC<Props> = ({ requests, width }) => {
292304 ? styles . network . waterfall . requestButtonYellow
293305 : request . type === "client-action"
294306 ? styles . network . waterfall . requestButtonPurple
295- : styles . network . waterfall . requestButtonWhite
307+ : request . type === "middleware"
308+ ? styles . network . waterfall . requestButtonOrange
309+ : request . type === "client-middleware"
310+ ? styles . network . waterfall . requestButtonPinkLight
311+ : styles . network . waterfall . requestButtonWhite
296312
297313 const indicatorColorClass =
298314 request . type === "loader"
@@ -303,7 +319,11 @@ const NetworkWaterfall: React.FC<Props> = ({ requests, width }) => {
303319 ? styles . network . waterfall . requestIndicatorYellow
304320 : request . type === "client-action"
305321 ? styles . network . waterfall . requestIndicatorPurple
306- : styles . network . waterfall . requestIndicatorWhite
322+ : request . type === "middleware"
323+ ? styles . network . waterfall . requestIndicatorOrange
324+ : request . type === "client-middleware"
325+ ? styles . network . waterfall . requestIndicatorPinkLight
326+ : styles . network . waterfall . requestIndicatorWhite
307327
308328 return (
309329 < div
0 commit comments