Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ee06e9

Browse files
committed
Remove page components
1 parentddca1a2 commit2ee06e9

22 files changed

+29
-1804
lines changed

‎viewer/packages/lowcoder/src/api/apiUtils.ts‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ERROR_500,
88
SERVER_API_TIMEOUT_ERROR,
99
}from"constants/messages";
10-
import{AUTH_BIND_URL,OAUTH_REDIRECT}from"constants/routesURL";
10+
import{OAUTH_REDIRECT}from"constants/routesURL";
1111
importlogfrom"loglevel";
1212
importhistoryfrom"util/history";
1313
importaxios,{AxiosError,AxiosRequestConfig,AxiosResponse,InternalAxiosRequestConfig}from"axios";
@@ -63,11 +63,6 @@ const notAuthRequiredPath = (requestUrl: string | undefined) => {
6363
);
6464
};
6565

66-
constnotNeedBindPath=()=>{
67-
constpathName=window.location.pathname;
68-
returnpathName===AUTH_BIND_URL||pathName===OAUTH_REDIRECT;
69-
};
70-
7166
exportconstapiRequestInterceptor=(config:InternalAxiosRequestConfig):AxiosRequestConfigWithTimer=>({
7267
...config,
7368
timer:performance.now(),
@@ -137,14 +132,6 @@ export const apiFailureResponseInterceptor = (error: any) => {
137132
});
138133
}
139134
}
140-
if(error.response?.data?.code===SERVER_ERROR_CODES.NEED_BIND&&!notNeedBindPath()){
141-
history.push(AUTH_BIND_URL);
142-
returnPromise.reject({
143-
code:ERROR_CODES.SERVER_ERROR,
144-
message:trans("apiMessage.verifyAccount"),
145-
show:false,
146-
});
147-
}
148135
if(
149136
error.response?.data?.code===SERVER_ERROR_CODES.CURRENT_EDITION_NOT_SUPPORT_THIS_FEATURE
150137
){

‎viewer/packages/lowcoder/src/app.tsx‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import {
77
BASE_URL,
88
isAuthUnRequired,
99
ORG_AUTH_LOGIN_URL,
10-
ORG_AUTH_REGISTER_URL,
1110
USER_AUTH_URL,
12-
ORG_AUTH_FORGOT_PASSWORD_URL,
13-
ORG_AUTH_RESET_PASSWORD_URL,
1411
}from"constants/routesURL";
1512
importReactfrom"react";
1613
import{createRoot}from"react-dom/client";
@@ -285,18 +282,6 @@ class AppIndex extends React.Component<AppIndexProps, any> {
285282
path={ORG_AUTH_LOGIN_URL}
286283
component={LazyUserAuthComp}
287284
/>
288-
<LazyRoute
289-
path={ORG_AUTH_REGISTER_URL}
290-
component={LazyUserAuthComp}
291-
/>
292-
<LazyRoute
293-
path={ORG_AUTH_FORGOT_PASSWORD_URL}
294-
component={LazyUserAuthComp}
295-
/>
296-
<LazyRoute
297-
path={ORG_AUTH_RESET_PASSWORD_URL}
298-
component={LazyUserAuthComp}
299-
/>
300285

301286
{this.props.isFetchUserFinished&&this.props.defaultHomePage?(
302287
<Redirectexactfrom={BASE_URL}to={APPLICATION_VIEW_URL(this.props.defaultHomePage||"","view")}/>

‎viewer/packages/lowcoder/src/constants/authConstants.ts‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
import{
2-
AUTH_BIND_URL,
3-
AUTH_FORGOT_PASSWORD_URL,
42
AUTH_LOGIN_URL,
5-
AUTH_REGISTER_URL,
6-
AUTH_RESET_PASSWORD_URL,
73
OAUTH_REDIRECT,
8-
ORG_AUTH_FORGOT_PASSWORD_URL,
94
ORG_AUTH_LOGIN_URL,
10-
ORG_AUTH_REGISTER_URL,
11-
ORG_AUTH_RESET_PASSWORD_URL,
125
}from"constants/routesURL";
136
import{InviteInfo}from"api/inviteApi";
14-
importLogin,{ThirdPartyBindCard}from"pages/userAuth/login";
15-
importUserRegisterfrom"pages/userAuth/register";
7+
importLoginfrom"pages/userAuth/login";
168
import{AuthRedirect}from"pages/userAuth/thirdParty/authRedirect";
179
importReactfrom"react";
18-
importForgotPasswordfrom"pages/userAuth/forgotPassword";
19-
importResetPasswordfrom"pages/userAuth/resetPassword";
2010

2111
exporttypeAuthInviteInfo=InviteInfo&{invitationId:string};
2212
exporttypeAuthLocationState={inviteInfo?:AuthInviteInfo;thirdPartyAuthError?:boolean};
@@ -83,15 +73,8 @@ export type ThirdPartyAuthGoal = "register" | "login" | "bind" | "innerBind";
8373

8474
exportconstAuthRoutes:Array<{path:string;component:React.ComponentType<any>}>=[
8575
{path:AUTH_LOGIN_URL,component:Login},
86-
{path:AUTH_BIND_URL,component:ThirdPartyBindCard},
87-
{path:AUTH_REGISTER_URL,component:UserRegister},
88-
{path:AUTH_FORGOT_PASSWORD_URL,component:ForgotPassword},
89-
{path:AUTH_RESET_PASSWORD_URL,component:ResetPassword},
9076
{path:OAUTH_REDIRECT,component:AuthRedirect},
9177
{path:ORG_AUTH_LOGIN_URL,component:Login},
92-
{path:ORG_AUTH_REGISTER_URL,component:UserRegister},
93-
{path:ORG_AUTH_FORGOT_PASSWORD_URL,component:ForgotPassword},
94-
{path:ORG_AUTH_RESET_PASSWORD_URL,component:ResetPassword},
9578
];
9679

9780
exporttypeServerAuthType="GOOGLE"|"GITHUB"|"FORM"|"KEYCLOAK"|"ORY"|"GENERIC";

‎viewer/packages/lowcoder/src/constants/configConstants.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import{ThirdPartyConfigType}from"constants/authConstants";
2-
import{QR_CODE_OAUTH_URL}from"constants/routesURL";
32
import{UserConnectionSource}from"@lowcoder-ee/constants/userConstants";
43
import{
54
isRouteLink,
@@ -83,7 +82,7 @@ export const transToSystemConfig = (responseData: ConfigResponseData): SystemCon
8382
if(isOAuthConfig(authConfig)){
8483
constrouteLinkConf:Partial<ThirdPartyConfigType>=isRouteLink(authConfig.authType)
8584
?{
86-
url:QR_CODE_OAUTH_URL,
85+
url:"",
8786
routeLink:true,
8887
}
8988
:{};
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import{AppViewMode,MarketplaceType}from"constants/applicationConstants";
2-
import{LocationDescriptor}from"history";
3-
import{UserGuideLocationState}from"pages/tutorials/tutorialsConstant";
4-
import{DatasourceType}from"@lowcoder-ee/constants/queryConstants";
1+
import{AppViewMode}from"constants/applicationConstants";
52

63
exportconstBASE_URL="/";
74
exportconstUSER_AUTH_URL="/user/auth";
@@ -10,24 +7,13 @@ export const ALL_APPLICATIONS_URL = "/apps";
107
exportconstAPPLICATION_MARKETPLACE_URL=`https://app.lowcoder.cloud/apps`;
118
exportconstMODULE_APPLICATIONS_URL="/apps/module";
129
exportconstDATASOURCE_URL=`/datasource`;
13-
exportconstDATASOURCE_CREATE_URL=`${DATASOURCE_URL}/new/:datasourceType`;
14-
exportconstDATASOURCE_EDIT_URL=`${DATASOURCE_URL}/:datasourceId`;
1510
exportconstQUERY_LIBRARY_URL=`/query-library`;
1611
exportconstFOLDER_URL_PREFIX=`/folder`;
1712
exportconstAPP_EDITOR_URL=`${ALL_APPLICATIONS_URL}/:applicationId/:viewMode/:appPageId?`;
1813

19-
exportconstAUTH_BIND_URL=`${USER_AUTH_URL}/bind`;
2014
exportconstAUTH_LOGIN_URL=`${USER_AUTH_URL}/login`;
21-
exportconstAUTH_REGISTER_URL=`${USER_AUTH_URL}/register`;
22-
exportconstAUTH_FORGOT_PASSWORD_URL=`${USER_AUTH_URL}/forgot-password`;
23-
exportconstAUTH_RESET_PASSWORD_URL=`${USER_AUTH_URL}/lost-password`;
24-
exportconstQR_CODE_OAUTH_URL=`${USER_AUTH_URL}/oauth/qrcode`;
2515
exportconstOAUTH_REDIRECT=`${USER_AUTH_URL}/oauth/redirect`;
26-
exportconstCAS_AUTH_REDIRECT=`${USER_AUTH_URL}/cas/redirect`;
2716
exportconstORG_AUTH_LOGIN_URL=`/org/:orgId/auth/login`;
28-
exportconstORG_AUTH_REGISTER_URL=`/org/:orgId/auth/register`;
29-
exportconstORG_AUTH_FORGOT_PASSWORD_URL=`/org/:orgId/auth/forgot-password`;
30-
exportconstORG_AUTH_RESET_PASSWORD_URL=`/org/:orgId/auth/lost-password`;
3117

3218
exportconstAPPLICATION_VIEW_URL=(appId:string,viewMode:AppViewMode)=>
3319
`${ALL_APPLICATIONS_URL}/${appId}/${viewMode}`;
@@ -47,26 +33,9 @@ export const isAuthUnRequired = (pathname: string): boolean => {
4733
);
4834
};
4935

50-
exportconstbuildDatasourceCreateUrl=(datasourceType:DatasourceType)=>
51-
`${DATASOURCE_URL}/new/${datasourceType}`;
52-
exportconstbuildDatasourceEditUrl=(datasourceId:string)=>
53-
`${DATASOURCE_URL}/${datasourceId}`;
54-
5536
exportconstbuildFolderUrl=(folderId:string)=>
5637
`${FOLDER_URL_PREFIX}/${folderId}`;
5738

58-
exportconstbuildAppRouteWithState=(
59-
appId:string,
60-
showGuide:boolean
61-
):LocationDescriptor<UserGuideLocationState>=>{
62-
return{
63-
pathname:APPLICATION_VIEW_URL(appId,"edit"),
64-
state:{
65-
showNewUserGuide:showGuide,
66-
},
67-
};
68-
};
69-
7039
exportfunctionpreview(applicationId:string){
7140
window.open(APPLICATION_VIEW_URL(applicationId,"preview"));
7241
}

‎viewer/packages/lowcoder/src/pages/editor/AppEditor.tsx‎

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import{AppPathParams,AppTypeEnum}from"constants/applicationConstants";
2-
import{Suspense,lazy,useCallback,useEffect,useMemo,useRef,useState}from"react";
2+
import{Suspense,lazy,useEffect,useMemo,useRef,useState}from"react";
33
import{useDispatch,useSelector}from"react-redux";
44
import{useParams}from"react-router";
55
import{AppSummaryInfo,fetchApplicationInfo}from"redux/reduxActions/applicationActions";
66
import{fetchDataSourceByApp,fetchDataSourceTypes}from"redux/reduxActions/datasourceActions";
77
import{getUser}from"redux/selectors/usersSelectors";
88
import{useUserViewMode}from"util/hooks";
99
import"comps/uiCompRegistry";
10-
import{showAppSnapshotSelector}from"redux/selectors/appSnapshotSelector";
1110
import{setShowAppSnapshot}from"redux/reduxActions/appSnapshotActions";
1211
import{fetchGroupsAction}from"redux/reduxActions/orgActions";
1312
import{getFetchOrgGroupsFinished}from"redux/selectors/orgSelectors";
@@ -26,23 +25,17 @@ import { fetchFolderElements } from "redux/reduxActions/folderActions";
2625
import{registryDataSourcePlugin}from"constants/queryConstants";
2726
import{DatasourceApi}from"api/datasourceApi";
2827
import{useRootCompInstance}from"./useRootCompInstance";
29-
import{ErrorBoundary,FallbackProps}from'react-error-boundary';
28+
import{ErrorBoundary}from'react-error-boundary';
3029
import{ALL_APPLICATIONS_URL}from"@lowcoder-ee/constants/routesURL";
3130
importhistoryfrom"util/history";
3231
importFlexfrom"antd/es/flex";
3332

34-
constAppSnapshot=lazy(()=>{
35-
returnimport("pages/editor/appSnapshot")
36-
.then(moduleExports=>({default:moduleExports.AppSnapshot}));
37-
});
38-
3933
constAppEditorInternalView=lazy(
4034
()=>import("pages/editor/appEditorInternal")
4135
.then(moduleExports=>({default:moduleExports.AppEditorInternalView}))
4236
);
4337

4438
exportdefaultfunctionAppEditor(){
45-
constshowAppSnapshot=useSelector(showAppSnapshotSelector);
4639
constparams=useParams<AppPathParams>();
4740
constisUserViewModeCheck=useUserViewMode();
4841
constisUserViewMode=params.viewMode ?isUserViewModeCheck :true;
@@ -166,27 +159,16 @@ export default function AppEditor() {
166159

167160
return(
168161
<ErrorBoundaryfallback={fallbackUI}>
169-
{showAppSnapshot ?(
170-
<Suspense>
171-
<AppSnapshot
172-
currentAppInfo={{
173-
...appInfo,
174-
dsl:compInstance.comp?.toJsonValue()||{},
175-
}}
176-
/>
177-
</Suspense>
178-
) :(
179-
<Suspense>
180-
<AppEditorInternalView
181-
appInfo={appInfo}
182-
readOnly={readOnly}
183-
loading={
184-
!fetchOrgGroupsFinished||!isDataSourcePluginRegistered||isCommonSettingsFetching
185-
}
186-
compInstance={compInstance}
187-
/>
188-
</Suspense>
189-
)}
162+
<Suspense>
163+
<AppEditorInternalView
164+
appInfo={appInfo}
165+
readOnly={readOnly}
166+
loading={
167+
!fetchOrgGroupsFinished||!isDataSourcePluginRegistered||isCommonSettingsFetching
168+
}
169+
compInstance={compInstance}
170+
/>
171+
</Suspense>
190172
</ErrorBoundary>
191173
);
192174
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp