Skip to content

Commit f74dfbc

Browse files
authored
Merge branch 'dev' into fix/minorBugs
2 parents e1940df + 5c4c13f commit f74dfbc

File tree

23 files changed

+742
-40
lines changed

23 files changed

+742
-40
lines changed

client/packages/lowcoder/src/comps/hooks/modalComp.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { withDefault } from "comps/generators";
2525
import SliderControl from "../controls/sliderControl";
2626

2727
const EventOptions = [
28+
{ label: trans("modalComp.open"), value: "open", description: trans("modalComp.openDesc") },
2829
{ label: trans("modalComp.close"), value: "close", description: trans("modalComp.closeDesc") },
2930
] as const;
3031

@@ -169,6 +170,9 @@ let TmpModalComp = (function () {
169170
afterClose={() => {
170171
props.toggleClose&&props.onEvent("close");
171172
}}
173+
afterOpenChange={(open: boolean) => {
174+
if (open) props.onEvent("open");
175+
}}
172176
zIndex={Layers.modal}
173177
modalRender={(node) => <ModalStyled $style={props.style}>{node}</ModalStyled>}
174178
mask={props.showMask}

client/packages/lowcoder/src/comps/hooks/utilsComp.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import copy from "copy-to-clipboard";
66
import { saveDataAsFile } from "../../util/fileUtils";
77
import { openApp, recordToSearchStr } from "../../util/appUtils";
88
import { trans } from "i18n";
9+
import { logoutAction } from "redux/reduxActions/userActions";
10+
import { useDispatch } from "react-redux";
11+
import { useCallback } from "react";
12+
913

1014
const UtilsCompBase = simpleMultiComp({});
1115
export let UtilsComp = withExposingConfigs(UtilsCompBase, []);
@@ -107,4 +111,14 @@ UtilsComp = withMethodExposing(UtilsComp, [
107111
}
108112
},
109113
},
114+
{
115+
method: {
116+
name: "logoutUser",
117+
description: trans("utilsComp.downloadFile"),
118+
params: [],
119+
},
120+
execute: (comp, params) => {
121+
logoutAction({})
122+
},
123+
},
110124
]);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const SERVER_HOST = `${REACT_APP_API_SERVICE_URL ?? ""}`;
2-
export const NPM_REGISTRY_URL = `${SERVER_HOST}/api/npm/registry`;
3-
export const NPM_PLUGIN_ASSETS_BASE_URL = `${SERVER_HOST}/api/npm/package`;
1+
export const SERVER_HOST = `${REACT_APP_NODE_SERVICE_URL ?? ""}`;
2+
export const NPM_REGISTRY_URL = `${SERVER_HOST}/node-service/api/npm/registry`;
3+
export const NPM_PLUGIN_ASSETS_BASE_URL = `${SERVER_HOST}/node-service/api/npm/package`;

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,8 @@ export const en = {
23692369

23702370

23712371
"modalComp": {
2372+
"open": "Open",
2373+
"openDesc": "Triggered When the Modal Dialog Box is Opened",
23722374
"close": "Close",
23732375
"closeDesc": "Triggered When the Modal Dialog Box is Closed",
23742376
"openModalDesc": "Open the Dialog Box",

client/packages/lowcoder/src/redux/reduxActions/userActions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export const fetchApiKeysAction = () => {
7070
type: ReduxActionTypes.FETCH_API_KEYS,
7171
};
7272
};
73-
7473
export const fetchApiKeysSuccess = (payload: FetchApiKeysPayload) => {
7574
return {
7675
type: ReduxActionTypes.FETCH_API_KEYS_SUCCESS,

client/packages/lowcoder/src/util/stringUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const checkPhoneValid = (value: string): boolean => {
8484
};
8585

8686
export const checkEmailValid = (value: string): boolean => {
87-
return EMAIL_PATTERN.test(value);
87+
return value === "admin@localhost" || EMAIL_PATTERN.test(value);
8888
};
8989

9090
export const getNextEntityName = (

0 commit comments

Comments
 (0)