Skip to content

Commit 447dd8e

Browse files
authored
Merge branch 'dev' into agora-integrationn
2 parents 7420095 + 8a4c0f6 commit 447dd8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+667
-195
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ updates:
66
directory: "/server/api-service"
77
schedule:
88
interval: "monthly"
9+
target-branch: "dev"
910
- package-ecosystem: "npm"
1011
directory: "/server/node-service"
1112
schedule:
1213
interval: "monthly"
14+
target-branch: "dev"
1315
- package-ecosystem: "npm"
1416
directory: "/client"
1517
schedule:
1618
interval: "monthly"
19+
target-branch: "dev"
1720
- package-ecosystem: "docker"
1821
directory: "/deploy/docker"
1922
schedule:
2023
interval: "monthly"
24+
target-branch: "dev"

client/packages/lowcoder-cli/client.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ declare var LOWCODER_NODE_SERVICE_URL: string;
3434
declare var LOWCODER_SHOW_BRAND: string;
3535
declare var LOWCODER_CUSTOM_LOGO: string;
3636
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
37+
declare var LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
3738
declare var REACT_APP_ENV: string;
3839
declare var REACT_APP_BUILD_ID: string;
3940
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder-dev-utils/buildVars.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export const buildVars = [
3535
name: "LOWCODER_NODE_SERVICE_URL",
3636
defaultValue: "",
3737
},
38+
{
39+
name: "LOWCODER_CUSTOM_AUTH_WELCOME_TEXT",
40+
defaultValue: "",
41+
},
3842
{
3943
name: "REACT_APP_ENV",
4044
defaultValue: "production",

client/packages/lowcoder/src/api/configApi.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ export interface ConfigResponse extends ApiResponse {
88
}
99

1010
class ConfigApi extends Api {
11-
static configURL = "/v1/configs";
11+
static configURL = "/configs";
1212

13-
static fetchConfig(): AxiosPromise<ConfigResponse> {
14-
return Api.get(ConfigApi.configURL);
13+
static fetchConfig(orgId?: string): AxiosPromise<ConfigResponse> {
14+
let authConfigURL = ConfigApi.configURL;
15+
if(orgId?.length) {
16+
authConfigURL += `?orgId?=${orgId}`;
17+
}
18+
return Api.get(authConfigURL);
1519
}
1620
}
1721

client/packages/lowcoder/src/api/inviteApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ export type InviteInfo = {
1414
inviteCode: string;
1515
createUserName: string;
1616
invitedOrganizationName: string;
17+
invitedOrganizationId: string;
1718
};
1819

1920
class InviteApi extends Api {
20-
static getInviteURL = "/v1/invitation";
21+
static getInviteURL = "/invitation";
2122
static acceptInviteURL = (invitationId: string) => `/v1/invitation/${invitationId}/invite`;
2223

2324
// generate invitation

client/packages/lowcoder/src/api/userApi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface CommonLoginParam {
99
invitationId?: string;
1010
authId?: string;
1111
source?: string;
12+
orgId?: string;
1213
}
1314

1415
export interface CommonBindParam {
@@ -17,8 +18,8 @@ export interface CommonBindParam {
1718
source?: string;
1819
}
1920

20-
interface ThirdPartyAuthRequest {
21-
state: string;
21+
export interface ThirdPartyAuthRequest {
22+
state?: string;
2223
code: string;
2324
redirectUrl: string;
2425
}

client/packages/lowcoder/src/app-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ declare var LOWCODER_NODE_SERVICE_URL: string;
3737
declare var LOWCODER_SHOW_BRAND: string;
3838
declare var LOWCODER_CUSTOM_LOGO: string;
3939
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
40+
declare var LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
4041
declare var REACT_APP_ENV: string;
4142
declare var REACT_APP_BUILD_ID: string;
4243
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder/src/app.tsx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
IMPORT_APP_FROM_TEMPLATE_URL,
1414
INVITE_LANDING_URL,
1515
isAuthUnRequired,
16+
ORG_AUTH_LOGIN_URL,
17+
ORG_AUTH_REGISTER_URL,
1618
QUERY_LIBRARY_URL,
1719
SETTING,
1820
TRASH_URL,
@@ -70,10 +72,11 @@ const Wrapper = (props: { children: React.ReactNode }) => (
7072
type AppIndexProps = {
7173
isFetchUserFinished: boolean;
7274
isFetchHomeFinished: boolean;
73-
isFetchingConfig: boolean;
75+
// isFetchingConfig: boolean;
76+
currentOrgId?: string;
7477
orgDev: boolean;
7578
defaultHomePage: string | null | undefined;
76-
fetchConfig: () => void;
79+
fetchConfig: (orgId?: string) => void;
7780
getCurrentUser: () => void;
7881
fetchHome: () => void;
7982
favicon: string;
@@ -83,16 +86,22 @@ type AppIndexProps = {
8386
class AppIndex extends React.Component<AppIndexProps, any> {
8487
componentDidMount() {
8588
this.props.getCurrentUser();
86-
this.props.fetchConfig();
87-
if (history.location.pathname === BASE_URL) {
89+
const { pathname } = history.location;
90+
91+
this.props.fetchConfig(this.props.currentOrgId);
92+
93+
if (pathname === BASE_URL) {
8894
this.props.fetchHome();
8995
}
9096
}
9197

92-
componentDidUpdate() {
98+
componentDidUpdate(prevProps: AppIndexProps) {
9399
if (history.location.pathname === BASE_URL) {
94100
this.props.fetchHome();
95101
}
102+
if(prevProps.currentOrgId !== this.props.currentOrgId) {
103+
this.props.fetchConfig(this.props.currentOrgId);
104+
}
96105
}
97106

98107
render() {
@@ -101,7 +110,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
101110
// make sure all users in this app have checked login info
102111
if (
103112
!this.props.isFetchUserFinished ||
104-
this.props.isFetchingConfig ||
113+
// this.props.isFetchingConfig ||
105114
(pathname === BASE_URL && !this.props.isFetchHomeFinished)
106115
) {
107116
const hideLoadingHeader = isTemplate || isAuthUnRequired(pathname);
@@ -151,6 +160,8 @@ class AppIndex extends React.Component<AppIndexProps, any> {
151160
component={ApplicationHome}
152161
/>
153162
<LazyRoute path={USER_AUTH_URL} component={LazyUserAuthComp} />
163+
<LazyRoute path={ORG_AUTH_LOGIN_URL} component={LazyUserAuthComp} />
164+
<LazyRoute path={ORG_AUTH_REGISTER_URL} component={LazyUserAuthComp} />
154165
<LazyRoute path={INVITE_LANDING_URL} component={LazyInviteLanding} />
155166
<LazyRoute path={`${COMPONENT_DOC_URL}/:name`} component={LazyComponentDoc} />
156167
<LazyRoute path={`/playground/:name/:dsl`} component={LazyComponentPlayground} />
@@ -174,8 +185,9 @@ class AppIndex extends React.Component<AppIndexProps, any> {
174185

175186
const mapStateToProps = (state: AppState) => ({
176187
isFetchUserFinished: isFetchUserFinished(state),
177-
isFetchingConfig: getSystemConfigFetching(state),
188+
// isFetchingConfig: getSystemConfigFetching(state),
178189
orgDev: state.ui.users.user.orgDev,
190+
currentOrgId: state.ui.users.user.currentOrgId,
179191
defaultHomePage: state.ui.application.homeOrg?.commonSettings.defaultHomePage,
180192
isFetchHomeFinished: state.ui.application.loadingStatus.fetchHomeDataFinished,
181193
favicon: getBrandingConfig(state)?.favicon
@@ -188,7 +200,7 @@ const mapDispatchToProps = (dispatch: any) => ({
188200
getCurrentUser: () => {
189201
dispatch(fetchUserAction());
190202
},
191-
fetchConfig: () => dispatch(fetchConfigAction()),
203+
fetchConfig: (orgId?: string) => dispatch(fetchConfigAction(orgId)),
192204
fetchHome: () => dispatch(fetchHomeData({})),
193205
});
194206

client/packages/lowcoder/src/appView/AppViewInstance.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export class AppViewInstance<I = any, O = any> {
3535
private events = new Map<keyof EventHandlerMap, EventHandlerMap<O>[keyof EventHandlerMap]>();
3636
private dataPromise: Promise<{ appDsl: any; moduleDslMap: any }>;
3737
private options: AppViewInstanceOptions = {
38-
baseUrl: "https://api.lowcoder.dev",
39-
webUrl: "https://cloud.lowcoder.dev",
38+
baseUrl: "https://api-service.lowcoder.cloud",
39+
webUrl: "https://app.lowcoder.cloud",
4040
};
4141

4242
constructor(private appId: string, private node: Element, options: AppViewInstanceOptions = {}) {

client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ import {
5959
import { timelineDate, timelineNode, TimelineDataTooltip } from "./timelineConstants";
6060
import { convertTimeLineData } from "./timelineUtils";
6161
import { Timeline } from "antd";
62-
import { ANTDICON } from "./antIcon";
62+
63+
import { ANTDICON } from "./antIcon"; // todo: select icons to not import all icons
6364

6465
const EventOptions = [
6566
clickEvent,
@@ -129,14 +130,13 @@ const TimelineComp = (
129130
<div
130131
style={{
131132
margin: style.margin ?? '3px',
132-
padding: style.padding ?? '3px',
133+
padding: style.padding !== '3px' ? style.padding : '20px 10px 0px 10px',
133134
width: widthCalculator(style.margin ?? '3px'),
134135
height: heightCalculator(style.margin ?? '3px'),
135136
background: style.background,
136137
overflow: "auto",
137138
overflowX: "hidden",
138139
borderRadius: style.radius,
139-
//height: '100%'
140140
}}
141141
>
142142
<Timeline

client/packages/lowcoder/src/comps/comps/timelineComp/timelineConstants.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ export const TimelineDataTooltip = (
3434

3535
export const timelineDate=[
3636
{
37-
title: "码匠发布",
37+
title: "Majiang Releases",
3838
subTitle: "Majiang Published in China",
3939
label: "2022-6-10",
4040
},
4141
{
42-
title: "openblocks开源",
42+
title: "Openblocks public release",
4343
subTitle: "Openblocks open source in GitHub",
4444
label: "2022-11-28",
4545
},
4646
{
47-
title: "最后一次提交代码",
47+
title: "Last code submission",
4848
subTitle: "Openblocks project abandoned",
4949
dot: "ExclamationCircleOutlined",
5050
label: "2023-3-28",
@@ -54,10 +54,10 @@ export const timelineDate=[
5454
lableColor: "red",
5555
},
5656
{
57-
title: "Lowcoder继续前行",
57+
title: "Lowcoder 2.0",
5858
subTitle: "Lowcoder, keep moving forward",
5959
dot: "LogoutOutlined",
6060
color: "green",
61-
label: "2023-4-26",
61+
label: "2023-6-20",
6262
},
6363
]

client/packages/lowcoder/src/constants/authConstants.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {
33
AUTH_LOGIN_URL,
44
AUTH_REGISTER_URL,
55
OAUTH_REDIRECT,
6+
ORG_AUTH_LOGIN_URL,
7+
ORG_AUTH_REGISTER_URL,
68
} from "constants/routesURL";
79
import { InviteInfo } from "api/inviteApi";
810
import Login, { ThirdPartyBindCard } from "pages/userAuth/login";
@@ -56,6 +58,7 @@ export type AuthSessionStoreParams = {
5658
afterLoginRedirect: string | null;
5759
sourceType: string;
5860
invitationId?: string;
61+
invitedOrganizationId?: string;
5962
routeLink?: boolean;
6063
name: string;
6164
authId?: string;
@@ -65,13 +68,15 @@ export type AuthSessionStoreParams = {
6568
* action after third party auth
6669
* bind & innerBind has different redirect action
6770
*/
68-
export type ThirdPartyAuthGoal = "login" | "bind" | "innerBind";
71+
export type ThirdPartyAuthGoal = "register" | "login" | "bind" | "innerBind";
6972

7073
export const AuthRoutes: Array<{ path: string; component: React.ComponentType<any> }> = [
7174
{ path: AUTH_LOGIN_URL, component: Login },
7275
{ path: AUTH_BIND_URL, component: ThirdPartyBindCard },
7376
{ path: AUTH_REGISTER_URL, component: UserRegister },
7477
{ path: OAUTH_REDIRECT, component: AuthRedirect },
78+
{ path: ORG_AUTH_LOGIN_URL, component: Login },
79+
{ path: ORG_AUTH_REGISTER_URL, component: UserRegister },
7580
];
7681

7782
export type ServerAuthType = "GOOGLE" | "GITHUB" | "FORM";

client/packages/lowcoder/src/constants/routesURL.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const CAS_AUTH_REDIRECT = `${USER_AUTH_URL}/cas/redirect`;
4141
export const LDAP_AUTH_LOGIN_URL = `${USER_AUTH_URL}/ldap/login`;
4242
export const USER_INFO_COMPLETION = `${USER_AUTH_URL}/completion`;
4343
export const INVITE_LANDING_URL = "/invite/:invitationId";
44+
export const ORG_AUTH_LOGIN_URL = `/org/:orgId/auth/login`;
45+
export const ORG_AUTH_REGISTER_URL = `/org/:orgId/auth/register`;
4446

4547
export const APPLICATION_VIEW_URL = (appId: string, viewMode: AppViewMode) =>
4648
`${ALL_APPLICATIONS_URL}/${appId}/${viewMode}`;
@@ -49,6 +51,8 @@ export const isAuthUnRequired = (pathname: string): boolean => {
4951
return (
5052
pathname.startsWith("/invite/") ||
5153
pathname.startsWith(USER_AUTH_URL) ||
54+
pathname.endsWith('/auth/login') ||
55+
pathname.endsWith('/auth/register') ||
5256
pathname.startsWith(COMPONENT_DOC_URL)
5357
);
5458
};

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import table from "./componentDocExtra/table.md?url";
22

33
export const en = {
44
productName: "Lowcoder",
5-
productDesc: "Build internal tools fast, with no limitations",
5+
productDesc: "Create software applications for your Company and your Customers with minimal coding experience. Lowcoder is the best Retool, Appsmith or Tooljet Alternative.",
66
notSupportedBrowser:
77
"Your current browser may have compatibility issues. For a better user experience, it is recommended to use the latest version of the Chrome browser.",
88
create: "Create",
@@ -1341,7 +1341,7 @@ export const en = {
13411341
},
13421342
audio: {
13431343
src: "Audio URL",
1344-
defaultSrcUrl: "https://cdn-files.lowcoder.dev/canon-excerpt.mp3",
1344+
defaultSrcUrl: "https://cdn-files.lowcoder.cloud/canon-excerpt.mp3",
13451345
autoPlay: "Autoplay",
13461346
loop: "Loop",
13471347
srcDesc: "Current audio URL",
@@ -1761,7 +1761,7 @@ export const en = {
17611761
phoneColumn: "Phone",
17621762
subTitle: "Title",
17631763
linkLabel: "Link",
1764-
linkUrl: "cloud.lowcoder.dev",
1764+
linkUrl: "app.lowcoder.cloud",
17651765
progressLabel: "Progress",
17661766
sliderLabel: "Slider",
17671767
radioLabel: "Radio",
@@ -2079,6 +2079,7 @@ export const en = {
20792079
resetSuccessDesc:
20802080
"Password reset succeeded. The new password is: {password}",
20812081
copyPassword: "Copy password",
2082+
poweredByLowcoder: "Powered by Lowcoder.cloud"
20822083
},
20832084
preLoad: {
20842085
jsLibraryHelpText:
@@ -2249,7 +2250,7 @@ export const en = {
22492250
},
22502251
docUrls: {
22512252
docHome: "https://docs.lowcoder.cloud/",
2252-
components: "https://cloud.lowcoder.dev/components?n={compType}",
2253+
components: "https://app.lowcoder.cloud/components?n={compType}",
22532254
module: "",
22542255
optionList: "",
22552256
terms: "",
@@ -2296,9 +2297,9 @@ export const en = {
22962297
},
22972298
componentDoc: {
22982299
markdownDemoText:
2299-
"**Lowcoder** is a _developer-friendly_ open-source low code platform to build internal apps within minutes.",
2300+
"**Lowcoder** | Create software applications for your Company and your Customers with minimal coding experience. Lowcoder is the best Retool, Appsmith or Tooljet Alternative.",
23002301
demoText:
2301-
"Lowcoder is a developer-friendly open-source low code platform to build internal apps within minutes.",
2302+
"Lowcoder | Create software applications for your Company and your Customers with minimal coding experience. Lowcoder is the best Retool, Appsmith or Tooljet Alternative.",
23022303
submit: "Submit",
23032304
style: "style",
23042305
danger: "Danger",

client/packages/lowcoder/src/i18n/locales/enObj.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const enObj: I18nObjects = {
112112
],
113113
},
114114
editorTutorials: {
115-
mockDataUrl: "https://63621db87521369cd06514c2.mockapi.io/api/lowcoder/users",
115+
mockDataUrl: "https://6523073ef43b179384152c4f.mockapi.io/api/lowcoder/users",
116116
data: (code) => (
117117
<>
118118
The component and query data are listed here, which can be referenced through

0 commit comments

Comments
 (0)