@@ -22,6 +22,7 @@ interface ProjectList {
2222 category ?: string ;
2323 pid : string | undefined ;
2424 role : string ;
25+ framework : string | undefined ;
2526 key : number ;
2627}
2728
@@ -65,7 +66,10 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
6566 < Link
6667 className = "text-sm font-medium hover:text-estela"
6768 to = { `/projects/${ project . pid } /dashboard` }
68- onClick = { ( ) => this . setUserRole ( project . role ) }
69+ onClick = { ( ) => {
70+ this . setUserRole ( project . role ) ;
71+ AuthService . setFramework ( String ( project . framework ) ) ;
72+ } }
6973 >
7074 { name }
7175 </ Link >
@@ -77,6 +81,14 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
7781 key : "pid" ,
7882 render : ( pid : string ) : ReactElement => < p className = "font-courier" > { pid } </ p > ,
7983 } ,
84+ {
85+ title : "FRAMEWORK" ,
86+ dataIndex : "framework" ,
87+ key : "framework" ,
88+ render : ( framework : string ) : ReactElement => (
89+ < Tag className = "border-estela-blue-full rounded-md text-estela-blue-full p-1" > { framework } </ Tag >
90+ ) ,
91+ } ,
8092 {
8193 title : "ROLE" ,
8294 dataIndex : "role" ,
@@ -99,11 +111,13 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
99111 async componentDidMount ( ) : Promise < void > {
100112 const { updateRole } = this . context as UserContextProps ;
101113 updateRole && updateRole ( "" ) ;
114+ AuthService . removeFramework ( ) ;
102115 const data = await this . getProjects ( 1 ) ;
103116 const projectData : ProjectList [ ] = data . data . map ( ( project : Project , id : number ) => {
104117 return {
105118 name : project . name ,
106119 category : project . category ,
120+ framework : project . framework ,
107121 pid : project . pid ,
108122 role :
109123 project . users ?. find ( ( user ) => user . user ?. username === AuthService . getUserUsername ( ) ) ?. permission ||
@@ -142,6 +156,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
142156 updateRole && updateRole ( response . users [ 0 ] . permission ?? "" ) ;
143157 }
144158 history . push ( `/projects/${ response . pid } /deploys` ) ;
159+ AuthService . setFramework ( String ( response . framework ) ) ;
145160 } ,
146161 ( error : unknown ) => {
147162 error ;
@@ -174,6 +189,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
174189 return {
175190 name : project . name ,
176191 pid : project . pid ,
192+ framework : project . framework ,
177193 role :
178194 project . users ?. find ( ( user ) => user . user ?. username === AuthService . getUserUsername ( ) ) ?. permission ||
179195 "Admin" ,
@@ -196,7 +212,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
196212 < >
197213 { loaded ? (
198214 < Fragment >
199- < Content className = "mx-4 " >
215+ < Content className = "mx-auto w-full lg:px-10 " >
200216 < Modal
201217 open = { modalWelcome }
202218 footer = { false }
@@ -237,7 +253,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
237253 </ Col >
238254 </ Row >
239255 </ Modal >
240- < Space direction = "vertical" className = "mx-8 " >
256+ < Space direction = "vertical" className = "w-full " >
241257 < Content className = "float-left" >
242258 < Text className = "text-3xl" >
243259 Welcome home
@@ -250,34 +266,38 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
250266 < Text className = "text-silver text-base font-medium" > RECENT PROJECTS</ Text >
251267 </ Col >
252268 </ Row >
253- < Row className = "grid grid-cols-3 gap-3 mt-4" >
269+ < Row className = "flex-row gap-3 mt-4" >
254270 { projects . map ( ( project : ProjectList , index ) => {
255271 return index < 3 ? (
256272 < Button
257273 key = { project . key }
258274 onClick = { ( ) => {
259275 const { updateRole } = this . context as UserContextProps ;
260276 AuthService . setUserRole ( project . role ) ;
277+ AuthService . setFramework ( String ( project . framework ) ) ;
261278 updateRole && updateRole ( project . role ) ;
262279 history . push ( `/projects/${ project . pid } /dashboard` ) ;
263280 } }
264- className = "bg-white rounded-md p-3 h-20 hover:border-none border-none hover:bg-estela-blue-low hover:text-estela-blue-full"
281+ className = "bg-white rounded-md w-fit h-fit px-4 py-3 hover:border-none border-none hover:bg-estela-blue-low hover:text-estela-blue-full"
265282 >
266- < Row className = "gap-3 m-1 " >
283+ < Row className = "gap-4 " >
267284 < Text className = "text-sm font-bold" > { project . name } </ Text >
268285 { index === 0 && (
269286 < Tag className = "text-estela bg-estela-blue-low border-none font-medium rounded-md" >
270287 New
271288 </ Tag >
272289 ) }
273290 </ Row >
274- < Row className = "flow-root rounded-md m-2 " >
275- < Text className = "float-left text-xs font-courier" >
276- { project . pid }
277- </ Text >
278- < Tag className = "float-right bg-white border-white rounded-md" >
291+ < Row className = "rounded-md my-3 " >
292+ < Text className = "text-xs font-courier" > { project . pid } </ Text >
293+ </ Row >
294+ < Row className = "w-full justify-between" >
295+ < Tag className = "bg-white border-white rounded-md" >
279296 { project . role }
280297 </ Tag >
298+ < Tag className = "border-estela-blue-full text-estela-blue-full rounded-md" >
299+ { project . framework }
300+ </ Tag >
281301 </ Row >
282302 </ Button >
283303 ) : (
@@ -412,10 +432,9 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
412432 </ Modal >
413433 </ Col >
414434 </ Row >
415- < Row >
435+ < Row className = "flex flex-col w-full" >
416436 < Table
417437 showHeader = { false }
418- tableLayout = "fixed"
419438 className = "rounded-2xl"
420439 columns = { this . columns }
421440 dataSource = { projects }
0 commit comments