@@ -6,10 +6,15 @@ import {
6
6
ArrowLeftOutlined ,
7
7
CloseCircleOutlined ,
8
8
ExclamationCircleOutlined ,
9
- WarningOutlined
9
+ WarningOutlined ,
10
+ CloudServerOutlined
10
11
} from '@ant-design/icons' ;
11
12
import { Environment } from '../types/environment.types' ;
12
13
import ContactLowcoderModal from './ContactLowcoderModal' ;
14
+ import ModernBreadcrumbs from './ModernBreadcrumbs' ;
15
+ import EnvironmentHeader from './EnvironmentHeader' ;
16
+ import StatsCard from './StatsCard' ;
17
+ import { Level1SettingPageContent } from "../../styled" ;
13
18
import history from "@lowcoder-ee/util/history" ;
14
19
15
20
const { Title, Text } = Typography ;
@@ -20,7 +25,7 @@ interface UnlicensedEnvironmentViewProps {
20
25
}
21
26
22
27
/**
23
- * Modern UI for unlicensed environments
28
+ * Consistent UI for unlicensed environments matching other environment pages
24
29
*/
25
30
const UnlicensedEnvironmentView : React . FC < UnlicensedEnvironmentViewProps > = ( {
26
31
environment,
@@ -65,84 +70,110 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
65
70
}
66
71
} ;
67
72
73
+ // Stats data consistent with other environment pages
74
+ const statsData = [
75
+ {
76
+ title : "Type" ,
77
+ value : environment . environmentType || "Unknown" ,
78
+ icon : < CloudServerOutlined /> ,
79
+ color : "#1890ff"
80
+ } ,
81
+ {
82
+ title : "Status" ,
83
+ value : "Unlicensed" ,
84
+ icon : < CloseCircleOutlined /> ,
85
+ color : "#ff4d4f"
86
+ } ,
87
+ {
88
+ title : "Master Env" ,
89
+ value : environment . isMaster ? "Yes" : "No" ,
90
+ icon : < CloudServerOutlined /> ,
91
+ color : environment . isMaster ? "#722ed1" : "#8c8c8c"
92
+ } ,
93
+ {
94
+ title : "License Issue" ,
95
+ value : environment . licenseStatus === 'error' ? "Error" : "Missing" ,
96
+ icon : environment . licenseStatus === 'error' ? < ExclamationCircleOutlined /> : < CloseCircleOutlined /> ,
97
+ color : environment . licenseStatus === 'error' ? "#faad14" : "#ff4d4f"
98
+ }
99
+ ] ;
100
+
68
101
return (
69
- < div style = { {
70
- padding : "24px" ,
71
- flex : 1 ,
72
- minWidth : '1000px' ,
73
- background : 'linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)'
74
- } } >
75
- < Row justify = "center" style = { { minHeight : '80vh' } } >
76
- < Col xs = { 24 } sm = { 20 } md = { 16 } lg = { 14 } xl = { 12 } >
77
- < div style = { {
78
- display : 'flex' ,
79
- flexDirection : 'column' ,
80
- justifyContent : 'center' ,
81
- alignItems : 'center' ,
82
- minHeight : '70vh' ,
83
- textAlign : 'center'
84
- } } >
85
- { /* Main Status Card */ }
86
- < Card
87
- style = { {
88
- width : '100%' ,
89
- borderRadius : '16px' ,
90
- boxShadow : '0 20px 40px rgba(0,0,0,0.1)' ,
91
- border : 'none' ,
92
- background : 'white' ,
93
- overflow : 'hidden'
94
- } }
95
- styles = { { body : { padding : '48px 32px' } } }
96
- >
102
+ < Level1SettingPageContent style = { { minWidth : "1000px" } } >
103
+ { /* Environment Header Component */ }
104
+ < EnvironmentHeader
105
+ environment = { environment }
106
+ onEditClick = { onEditClick }
107
+ />
108
+
109
+ { /* Stats Cards Row */ }
110
+ < Row gutter = { [ 16 , 16 ] } style = { { marginBottom : "24px" } } >
111
+ { statsData . map ( ( stat , index ) => (
112
+ < Col xs = { 24 } sm = { 12 } lg = { 6 } key = { index } >
113
+ < StatsCard
114
+ title = { stat . title }
115
+ value = { stat . value }
116
+ icon = { stat . icon }
117
+ color = { stat . color }
118
+ />
119
+ </ Col >
120
+ ) ) }
121
+ </ Row >
122
+
123
+ { /* Breadcrumbs */ }
124
+ < ModernBreadcrumbs
125
+ items = { [
126
+ {
127
+ key : 'environments' ,
128
+ title : 'Environments' ,
129
+ onClick : ( ) => history . push ( '/setting/environments' )
130
+ } ,
131
+ {
132
+ key : 'current' ,
133
+ title : environment . environmentName || "Environment Detail"
134
+ }
135
+ ] }
136
+ />
137
+
138
+ { /* License Issue Card */ }
139
+ < Card
140
+ style = { {
141
+ marginBottom : "24px" ,
142
+ borderRadius : '4px' ,
143
+ border : '1px solid #f0f0f0' ,
144
+ background : 'white'
145
+ } }
146
+ styles = { { body : { padding : '32px' } } }
147
+ >
148
+ < Row justify = "center" >
149
+ < Col xs = { 24 } sm = { 20 } md = { 16 } lg = { 12 } >
150
+ < div style = { {
151
+ display : 'flex' ,
152
+ flexDirection : 'column' ,
153
+ alignItems : 'center' ,
154
+ textAlign : 'center'
155
+ } } >
97
156
{ /* Status Icon */ }
98
157
< div style = { { marginBottom : '24px' } } >
99
158
{ getLicenseIcon ( ) }
100
159
</ div >
101
160
102
- { /* Environment Info */ }
103
- < div style = { { marginBottom : '32px' } } >
104
- < Title level = { 2 } style = { { marginBottom : '8px' , color : '#262626' } } >
105
- { getLicenseTitle ( ) }
106
- </ Title >
107
- < Text style = { {
108
- fontSize : '16px' ,
109
- color : '#595959' ,
110
- display : 'block' ,
111
- marginBottom : '16px' ,
112
- lineHeight : '1.6'
113
- } } >
114
- { getLicenseDescription ( ) }
115
- </ Text >
116
-
117
- { /* Environment Details */ }
118
- < div style = { {
119
- background : '#fafafa' ,
120
- padding : '16px' ,
121
- borderRadius : '8px' ,
122
- marginTop : '24px' ,
123
- border : '1px solid #f0f0f0'
124
- } } >
125
- < Text strong style = { { color : '#8c8c8c' , fontSize : '14px' } } > Environment:</ Text >
126
- < Text style = { {
127
- display : 'block' ,
128
- fontSize : '16px' ,
129
- color : '#262626' ,
130
- marginTop : '4px'
131
- } } >
132
- { environment . environmentName || 'Unnamed Environment' }
133
- </ Text >
134
- < Text style = { {
135
- fontSize : '13px' ,
136
- color : '#8c8c8c' ,
137
- fontFamily : 'monospace'
138
- } } >
139
- ID: { environment . environmentId }
140
- </ Text >
141
- </ div >
142
- </ div >
161
+ { /* License Issue Information */ }
162
+ < Title level = { 2 } style = { { marginBottom : '12px' , color : '#262626' } } >
163
+ { getLicenseTitle ( ) }
164
+ </ Title >
165
+ < Text style = { {
166
+ fontSize : '16px' ,
167
+ color : '#595959' ,
168
+ marginBottom : '24px' ,
169
+ lineHeight : '1.6' ,
170
+ maxWidth : '500px'
171
+ } } >
172
+ { getLicenseDescription ( ) }
173
+ </ Text >
143
174
144
175
{ /* Action Buttons */ }
145
- < Space size = "large" direction = "vertical" style = { { width : '100%' } } >
176
+ < Space size = "large" direction = "vertical" style = { { width : '100%' , maxWidth : '400px' } } >
146
177
< Button
147
178
type = "primary"
148
179
size = "large"
@@ -151,12 +182,9 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
151
182
style = { {
152
183
width : '100%' ,
153
184
height : '48px' ,
154
- borderRadius : '8px ' ,
185
+ borderRadius : '4px ' ,
155
186
fontSize : '16px' ,
156
- fontWeight : 500 ,
157
- background : 'linear-gradient(135deg, #1890ff 0%, #0050b3 100%)' ,
158
- border : 'none' ,
159
- boxShadow : '0 4px 12px rgba(24, 144, 255, 0.3)'
187
+ fontWeight : 500
160
188
} }
161
189
>
162
190
Contact Lowcoder Team
@@ -169,11 +197,9 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
169
197
style = { {
170
198
width : '100%' ,
171
199
height : '48px' ,
172
- borderRadius : '8px ' ,
200
+ borderRadius : '4px ' ,
173
201
fontSize : '16px' ,
174
- fontWeight : 500 ,
175
- borderColor : '#d9d9d9' ,
176
- color : '#595959'
202
+ fontWeight : 500
177
203
} }
178
204
>
179
205
Edit Environment
@@ -186,39 +212,46 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
186
212
style = { {
187
213
width : '100%' ,
188
214
height : '48px' ,
189
- borderRadius : '8px ' ,
215
+ borderRadius : '4px ' ,
190
216
fontSize : '16px' ,
191
- fontWeight : 500 ,
192
- borderColor : '#d9d9d9' ,
193
- color : '#8c8c8c'
217
+ fontWeight : 500
194
218
} }
195
219
>
196
220
Back to Environments
197
221
</ Button >
198
222
</ Space >
199
- </ Card >
200
-
201
- { /* Footer Help Text */ }
202
- < Text style = { {
203
- marginTop : '24px' ,
204
- color : '#8c8c8c' ,
205
- fontSize : '14px' ,
206
- maxWidth : '400px' ,
207
- lineHeight : '1.5'
208
- } } >
209
- Need assistance? Contact our team for licensing support or edit the environment configuration to resolve this issue.
210
- </ Text >
211
- </ div >
212
- </ Col >
213
- </ Row >
223
+ </ div >
224
+ </ Col >
225
+ </ Row >
226
+ </ Card >
227
+
228
+ { /* Help Text */ }
229
+ < Card
230
+ style = { {
231
+ borderRadius : '4px' ,
232
+ border : '1px solid #f0f0f0' ,
233
+ background : '#fafafa'
234
+ } }
235
+ styles = { { body : { padding : '16px' } } }
236
+ >
237
+ < Text style = { {
238
+ color : '#8c8c8c' ,
239
+ fontSize : '14px' ,
240
+ textAlign : 'center' ,
241
+ display : 'block' ,
242
+ lineHeight : '1.5'
243
+ } } >
244
+ Need assistance? Contact our team for licensing support or edit the environment configuration to resolve this issue.
245
+ </ Text >
246
+ </ Card >
214
247
215
248
{ /* Contact Lowcoder Modal */ }
216
249
< ContactLowcoderModal
217
250
visible = { isContactModalVisible }
218
251
onClose = { ( ) => setIsContactModalVisible ( false ) }
219
252
environment = { environment }
220
253
/>
221
- </ div >
254
+ </ Level1SettingPageContent >
222
255
) ;
223
256
} ;
224
257
0 commit comments