@@ -22,6 +22,7 @@ interface ProjectList {
22
22
category ?: string ;
23
23
pid : string | undefined ;
24
24
role : string ;
25
+ framework : string | undefined ;
25
26
key : number ;
26
27
}
27
28
@@ -65,7 +66,10 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
65
66
< Link
66
67
className = "text-sm font-medium hover:text-estela"
67
68
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
+ } }
69
73
>
70
74
{ name }
71
75
</ Link >
@@ -77,6 +81,14 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
77
81
key : "pid" ,
78
82
render : ( pid : string ) : ReactElement => < p className = "font-courier" > { pid } </ p > ,
79
83
} ,
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
+ } ,
80
92
{
81
93
title : "ROLE" ,
82
94
dataIndex : "role" ,
@@ -99,11 +111,13 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
99
111
async componentDidMount ( ) : Promise < void > {
100
112
const { updateRole } = this . context as UserContextProps ;
101
113
updateRole && updateRole ( "" ) ;
114
+ AuthService . removeFramework ( ) ;
102
115
const data = await this . getProjects ( 1 ) ;
103
116
const projectData : ProjectList [ ] = data . data . map ( ( project : Project , id : number ) => {
104
117
return {
105
118
name : project . name ,
106
119
category : project . category ,
120
+ framework : project . framework ,
107
121
pid : project . pid ,
108
122
role :
109
123
project . users ?. find ( ( user ) => user . user ?. username === AuthService . getUserUsername ( ) ) ?. permission ||
@@ -142,6 +156,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
142
156
updateRole && updateRole ( response . users [ 0 ] . permission ?? "" ) ;
143
157
}
144
158
history . push ( `/projects/${ response . pid } /deploys` ) ;
159
+ AuthService . setFramework ( String ( response . framework ) ) ;
145
160
} ,
146
161
( error : unknown ) => {
147
162
error ;
@@ -174,6 +189,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
174
189
return {
175
190
name : project . name ,
176
191
pid : project . pid ,
192
+ framework : project . framework ,
177
193
role :
178
194
project . users ?. find ( ( user ) => user . user ?. username === AuthService . getUserUsername ( ) ) ?. permission ||
179
195
"Admin" ,
@@ -196,7 +212,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
196
212
< >
197
213
{ loaded ? (
198
214
< Fragment >
199
- < Content className = "mx-4 " >
215
+ < Content className = "mx-auto w-full lg:px-10 " >
200
216
< Modal
201
217
open = { modalWelcome }
202
218
footer = { false }
@@ -237,7 +253,7 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
237
253
</ Col >
238
254
</ Row >
239
255
</ Modal >
240
- < Space direction = "vertical" className = "mx-8 " >
256
+ < Space direction = "vertical" className = "w-full " >
241
257
< Content className = "float-left" >
242
258
< Text className = "text-3xl" >
243
259
Welcome home
@@ -250,34 +266,38 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
250
266
< Text className = "text-silver text-base font-medium" > RECENT PROJECTS</ Text >
251
267
</ Col >
252
268
</ Row >
253
- < Row className = "grid grid-cols-3 gap-3 mt-4" >
269
+ < Row className = "flex-row gap-3 mt-4" >
254
270
{ projects . map ( ( project : ProjectList , index ) => {
255
271
return index < 3 ? (
256
272
< Button
257
273
key = { project . key }
258
274
onClick = { ( ) => {
259
275
const { updateRole } = this . context as UserContextProps ;
260
276
AuthService . setUserRole ( project . role ) ;
277
+ AuthService . setFramework ( String ( project . framework ) ) ;
261
278
updateRole && updateRole ( project . role ) ;
262
279
history . push ( `/projects/${ project . pid } /dashboard` ) ;
263
280
} }
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"
265
282
>
266
- < Row className = "gap-3 m-1 " >
283
+ < Row className = "gap-4 " >
267
284
< Text className = "text-sm font-bold" > { project . name } </ Text >
268
285
{ index === 0 && (
269
286
< Tag className = "text-estela bg-estela-blue-low border-none font-medium rounded-md" >
270
287
New
271
288
</ Tag >
272
289
) }
273
290
</ 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" >
279
296
{ project . role }
280
297
</ Tag >
298
+ < Tag className = "border-estela-blue-full text-estela-blue-full rounded-md" >
299
+ { project . framework }
300
+ </ Tag >
281
301
</ Row >
282
302
</ Button >
283
303
) : (
@@ -412,10 +432,9 @@ export class ProjectListPage extends Component<unknown, ProjectsPageState> {
412
432
</ Modal >
413
433
</ Col >
414
434
</ Row >
415
- < Row >
435
+ < Row className = "flex flex-col w-full" >
416
436
< Table
417
437
showHeader = { false }
418
- tableLayout = "fixed"
419
438
className = "rounded-2xl"
420
439
columns = { this . columns }
421
440
dataSource = { projects }
0 commit comments