@@ -69,7 +69,6 @@ import { SubscriptionProductsEnum } from '@lowcoder-ee/constants/subscriptionCon
69
69
import AppEditor from "../editor/AppEditor" ;
70
70
import { fetchDeploymentIdAction } from "@lowcoder-ee/redux/reduxActions/configActions" ;
71
71
import { getDeploymentId } from "@lowcoder-ee/redux/selectors/configSelectors" ;
72
- import { SimpleSubscriptionContextProvider } from '@lowcoder-ee/util/context/SimpleSubscriptionContext' ;
73
72
import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
74
73
75
74
const TabLabel = styled . div `
@@ -154,171 +153,169 @@ export default function ApplicationHome() {
154
153
return (
155
154
< DivStyled >
156
155
< LoadingBarHideTrigger />
157
- < SimpleSubscriptionContextProvider >
158
- < Layout
159
- sections = { [
160
- {
161
- items : [
162
- {
163
- text : < TabLabel > { trans ( "home.profile" ) } </ TabLabel > ,
164
- routePath : USER_PROFILE_URL ,
165
- routeComp : UserProfileView ,
166
- icon : ( { selected, ...otherProps } ) => selected ? < UserIcon { ...otherProps } width = { "24px" } /> : < UserIcon { ...otherProps } width = { "24px" } /> ,
167
- mobileVisible : true ,
168
- } ,
169
- {
170
- text : < TabLabel > { trans ( "home.news" ) } </ TabLabel > ,
171
- routePath : NEWS_URL ,
172
- routeComp : NewsView ,
173
- icon : ( { selected, ...otherProps } ) => selected ? < NewsIcon { ...otherProps } width = { "24px" } /> : < NewsIcon { ...otherProps } width = { "24px" } /> ,
174
- visible : ( { user } ) => user . orgDev ,
175
- style : { color : "red" } ,
176
- mobileVisible : false ,
177
- } ,
178
- {
179
- text : < TabLabel > { trans ( "home.orgHome" ) } </ TabLabel > ,
180
- routePath : ORG_HOME_URL ,
181
- routePathExact : false ,
182
- routeComp : OrgView ,
183
- icon : ( { selected, ...otherProps } ) => selected ? < WorkspacesIcon { ...otherProps } width = { "24px" } /> : < WorkspacesIcon { ...otherProps } width = { "24px" } /> ,
184
- visible : ( { user } ) => ! user . orgDev ,
185
- mobileVisible : true ,
186
- } ,
187
- {
188
- text : < TabLabel > { trans ( "home.marketplace" ) } </ TabLabel > ,
189
- routePath : MARKETPLACE_URL ,
190
- routePathExact : false ,
191
- routeComp : MarketplaceView ,
192
- icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
193
- mobileVisible : false ,
194
- } ,
195
- ]
196
- } ,
156
+ < Layout
157
+ sections = { [
158
+ {
159
+ items : [
160
+ {
161
+ text : < TabLabel > { trans ( "home.profile" ) } </ TabLabel > ,
162
+ routePath : USER_PROFILE_URL ,
163
+ routeComp : UserProfileView ,
164
+ icon : ( { selected, ...otherProps } ) => selected ? < UserIcon { ...otherProps } width = { "24px" } /> : < UserIcon { ...otherProps } width = { "24px" } /> ,
165
+ mobileVisible : true ,
166
+ } ,
167
+ {
168
+ text : < TabLabel > { trans ( "home.news" ) } </ TabLabel > ,
169
+ routePath : NEWS_URL ,
170
+ routeComp : NewsView ,
171
+ icon : ( { selected, ...otherProps } ) => selected ? < NewsIcon { ...otherProps } width = { "24px" } /> : < NewsIcon { ...otherProps } width = { "24px" } /> ,
172
+ visible : ( { user } ) => user . orgDev ,
173
+ style : { color : "red" } ,
174
+ mobileVisible : false ,
175
+ } ,
176
+ {
177
+ text : < TabLabel > { trans ( "home.orgHome" ) } </ TabLabel > ,
178
+ routePath : ORG_HOME_URL ,
179
+ routePathExact : false ,
180
+ routeComp : OrgView ,
181
+ icon : ( { selected, ...otherProps } ) => selected ? < WorkspacesIcon { ...otherProps } width = { "24px" } /> : < WorkspacesIcon { ...otherProps } width = { "24px" } /> ,
182
+ visible : ( { user } ) => ! user . orgDev ,
183
+ mobileVisible : true ,
184
+ } ,
185
+ {
186
+ text : < TabLabel > { trans ( "home.marketplace" ) } </ TabLabel > ,
187
+ routePath : MARKETPLACE_URL ,
188
+ routePathExact : false ,
189
+ routeComp : MarketplaceView ,
190
+ icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
191
+ mobileVisible : false ,
192
+ } ,
193
+ ]
194
+ } ,
197
195
198
- {
199
- items : [
200
- // {
201
- // text: <MoreFoldersWrapper>{trans("home.allFolders")}</MoreFoldersWrapper>,
202
- // routePath: FOLDERS_URL,
203
- // routeComp: RootFolderListView,
204
- // icon: ({ selected, ...otherProps }) => selected ? <FolderIcon {...otherProps} width={"24px"}/> : <FolderIcon {...otherProps} width={"24px"}/>,
205
- // },
206
- {
207
- text : < TabLabel > { trans ( "home.allApplications" ) } </ TabLabel > ,
208
- routePath : ALL_APPLICATIONS_URL ,
209
- routeComp : HomeView ,
210
- icon : ( { selected, ...otherProps } ) => selected ? < AppsIcon { ...otherProps } width = { "24px" } /> : < AppsIcon { ...otherProps } width = { "24px" } /> ,
211
- mobileVisible : true ,
212
- } ,
213
- ] ,
214
- } ,
215
-
216
- {
217
- items : [
218
-
219
- {
220
- text : < TabLabel > { trans ( "home.queryLibrary" ) } </ TabLabel > ,
221
- routePath : QUERY_LIBRARY_URL ,
222
- routeComp : QueryLibraryEditor ,
223
- icon : ( { selected, ...otherProps } ) => selected ? < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> : < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> ,
224
- visible : ( { user } ) => user . orgDev ,
225
- mobileVisible : false ,
226
- } ,
227
- {
228
- text : < TabLabel > { trans ( "home.datasource" ) } </ TabLabel > ,
229
- routePath : DATASOURCE_URL ,
230
- routePathExact : false ,
231
- routeComp : DatasourceHome ,
232
- icon : ( { selected, ...otherProps } ) => selected ? < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> : < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> ,
233
- visible : ( { user } ) => user . orgDev ,
234
- onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "datasource" ,
235
- mobileVisible : false ,
236
- } ,
237
- ] ,
238
- } ,
239
- isEE ( ) ? {
240
- items : [
241
- {
242
- text : < TabLabel > { trans ( "settings.AppUsage" ) } </ TabLabel > ,
243
- routePath : "/ee/6600ae8724a23f365ba2ed4c/admin" ,
244
- routePathExact : false ,
245
- routeComp : AppEditor ,
246
- icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
247
- visible : ( { user } ) => user . orgDev ,
248
- mobileVisible : false ,
249
- } ,
250
- ] ,
251
- } : { items : [ ] } ,
196
+ {
197
+ items : [
198
+ // {
199
+ // text: <MoreFoldersWrapper>{trans("home.allFolders")}</MoreFoldersWrapper>,
200
+ // routePath: FOLDERS_URL,
201
+ // routeComp: RootFolderListView,
202
+ // icon: ({ selected, ...otherProps }) => selected ? <FolderIcon {...otherProps} width={"24px"}/> : <FolderIcon {...otherProps} width={"24px"}/>,
203
+ // },
204
+ {
205
+ text : < TabLabel > { trans ( "home.allApplications" ) } </ TabLabel > ,
206
+ routePath : ALL_APPLICATIONS_URL ,
207
+ routeComp : HomeView ,
208
+ icon : ( { selected, ...otherProps } ) => selected ? < AppsIcon { ...otherProps } width = { "24px" } /> : < AppsIcon { ...otherProps } width = { "24px" } /> ,
209
+ mobileVisible : true ,
210
+ } ,
211
+ ] ,
212
+ } ,
213
+
214
+ {
215
+ items : [
216
+
217
+ {
218
+ text : < TabLabel > { trans ( "home.queryLibrary" ) } </ TabLabel > ,
219
+ routePath : QUERY_LIBRARY_URL ,
220
+ routeComp : QueryLibraryEditor ,
221
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> : < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> ,
222
+ visible : ( { user } ) => user . orgDev ,
223
+ mobileVisible : false ,
224
+ } ,
225
+ {
226
+ text : < TabLabel > { trans ( "home.datasource" ) } </ TabLabel > ,
227
+ routePath : DATASOURCE_URL ,
228
+ routePathExact : false ,
229
+ routeComp : DatasourceHome ,
230
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> : < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> ,
231
+ visible : ( { user } ) => user . orgDev ,
232
+ onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "datasource" ,
233
+ mobileVisible : false ,
234
+ } ,
235
+ ] ,
236
+ } ,
237
+ isEE ( ) ? {
238
+ items : [
239
+ {
240
+ text : < TabLabel > { trans ( "settings.AppUsage" ) } </ TabLabel > ,
241
+ routePath : "/ee/6600ae8724a23f365ba2ed4c/admin" ,
242
+ routePathExact : false ,
243
+ routeComp : AppEditor ,
244
+ icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
245
+ visible : ( { user } ) => user . orgDev ,
246
+ mobileVisible : false ,
247
+ } ,
248
+ ] ,
249
+ } : { items : [ ] } ,
252
250
253
- ! supportSubscription && user . orgDev ? {
254
- items : [
255
- {
256
- text : < TabLabel > { trans ( "home.support" ) } </ TabLabel > ,
257
- routePath : SUBSCRIPTION_SETTING ,
258
- routeComp : Subscription ,
259
- routePathExact : false ,
260
- icon : ( { selected, ...otherProps } ) => selected ? < SupportIcon { ...otherProps } width = { "24px" } /> : < SupportIcon { ...otherProps } width = { "24px" } /> ,
261
- mobileVisible : true ,
262
- } ,
263
- ] ,
264
- } : { items : [ ] } ,
251
+ ! supportSubscription && user . orgDev ? {
252
+ items : [
253
+ {
254
+ text : < TabLabel > { trans ( "home.support" ) } </ TabLabel > ,
255
+ routePath : SUBSCRIPTION_SETTING ,
256
+ routeComp : Subscription ,
257
+ routePathExact : false ,
258
+ icon : ( { selected, ...otherProps } ) => selected ? < SupportIcon { ...otherProps } width = { "24px" } /> : < SupportIcon { ...otherProps } width = { "24px" } /> ,
259
+ mobileVisible : true ,
260
+ } ,
261
+ ] ,
262
+ } : { items : [ ] } ,
265
263
266
- supportSubscription && user . orgDev ? {
267
- items : [
268
- {
269
- text : < TabLabel > { trans ( "home.support" ) } </ TabLabel > ,
270
- routePath : SUPPORT_URL ,
271
- routeComp : Support ,
272
- routePathExact : false ,
273
- icon : ( { selected, ...otherProps } ) => selected ? < SupportIcon { ...otherProps } width = { "24px" } /> : < SupportIcon { ...otherProps } width = { "24px" } /> ,
274
- mobileVisible : true ,
275
- } ,
276
- ] ,
277
- } : { items : [ ] } ,
264
+ supportSubscription && user . orgDev ? {
265
+ items : [
266
+ {
267
+ text : < TabLabel > { trans ( "home.support" ) } </ TabLabel > ,
268
+ routePath : SUPPORT_URL ,
269
+ routeComp : Support ,
270
+ routePathExact : false ,
271
+ icon : ( { selected, ...otherProps } ) => selected ? < SupportIcon { ...otherProps } width = { "24px" } /> : < SupportIcon { ...otherProps } width = { "24px" } /> ,
272
+ mobileVisible : true ,
273
+ } ,
274
+ ] ,
275
+ } : { items : [ ] } ,
278
276
279
- {
280
- items : [
281
- {
282
- text : < TabLabel > { trans ( "settings.title" ) } </ TabLabel > ,
283
- routePath : SETTING_URL ,
284
- routePathExact : false ,
285
- routeComp : Setting ,
286
- icon : ( { selected, ...otherProps } ) => selected ? < HomeSettingIcon { ...otherProps } width = { "24px" } /> : < HomeSettingIcon { ...otherProps } width = { "24px" } /> ,
287
- visible : ( { user } ) => user . orgDev ,
288
- onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "setting" ,
289
- mobileVisible : false ,
290
- }
291
- ]
292
- } ,
277
+ {
278
+ items : [
279
+ {
280
+ text : < TabLabel > { trans ( "settings.title" ) } </ TabLabel > ,
281
+ routePath : SETTING_URL ,
282
+ routePathExact : false ,
283
+ routeComp : Setting ,
284
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeSettingIcon { ...otherProps } width = { "24px" } /> : < HomeSettingIcon { ...otherProps } width = { "24px" } /> ,
285
+ visible : ( { user } ) => user . orgDev ,
286
+ onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "setting" ,
287
+ mobileVisible : false ,
288
+ }
289
+ ]
290
+ } ,
293
291
294
- {
295
- items : [
296
- {
297
- text : < TabLabel > { trans ( "home.trash" ) } </ TabLabel > ,
298
- routePath : TRASH_URL ,
299
- routeComp : TrashView ,
300
- icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
301
- visible : ( { user } ) => user . orgDev ,
302
- mobileVisible : false ,
303
- } ,
304
- ] ,
305
- } ,
292
+ {
293
+ items : [
294
+ {
295
+ text : < TabLabel > { trans ( "home.trash" ) } </ TabLabel > ,
296
+ routePath : TRASH_URL ,
297
+ routeComp : TrashView ,
298
+ icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
299
+ visible : ( { user } ) => user . orgDev ,
300
+ mobileVisible : false ,
301
+ } ,
302
+ ] ,
303
+ } ,
306
304
307
- // this we need to show the Folders view in the Admin Area
308
- {
309
- items : [
310
- {
311
- text : "" ,
312
- routePath : FOLDER_URL ,
313
- routeComp : FolderView ,
314
- visible : ( ) => false ,
315
- }
316
- ]
317
- }
305
+ // this we need to show the Folders view in the Admin Area
306
+ {
307
+ items : [
308
+ {
309
+ text : "" ,
310
+ routePath : FOLDER_URL ,
311
+ routeComp : FolderView ,
312
+ visible : ( ) => false ,
313
+ }
314
+ ]
315
+ }
318
316
319
- ] }
320
- />
321
- </ SimpleSubscriptionContextProvider >
317
+ ] }
318
+ />
322
319
</ DivStyled >
323
320
) ;
324
321
}
0 commit comments