Skip to content

Commit a3389a4

Browse files
authored
Merge branch 'dev' into nav-layout-updates
2 parents b06fa7e + d3ef400 commit a3389a4

File tree

12 files changed

+110
-52
lines changed

12 files changed

+110
-52
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.5
1+
2.1.7

client/packages/lowcoder-design/src/components/Section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ export const sectionNames = {
142142
validation: trans("prop.validation"),
143143
layout: trans("prop.layout"),
144144
style: trans("prop.style"),
145-
meetings : trans("prop.meetings"),
145+
meetings : trans("prop.meetings"), // added by Falk Wolsky
146146
};

client/packages/lowcoder/src/components/CompName.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { GreyTextColor } from "constants/style";
1111
import { UICompType } from "comps/uiCompRegistry";
1212
import { trans } from "i18n";
1313
import { getComponentDocUrl } from "comps/utils/compDocUtil";
14+
import { getComponentPlaygroundUrl } from "comps/utils/compDocUtil";
1415
import { parseCompType } from "comps/utils/remote";
1516

1617
const CompDiv = styled.div<{ width?: number; hasSearch?: boolean; showSearch?: boolean }>`
@@ -78,6 +79,7 @@ export const CompName = (props: Iprops) => {
7879
const compType = selectedComp.children.compType.getView() as UICompType;
7980
const compInfo = parseCompType(compType);
8081
const docUrl = getComponentDocUrl(compType);
82+
const playgroundUrl = getComponentPlaygroundUrl(compType);
8183

8284
const items: EditPopoverItemType[] = [];
8385

@@ -99,6 +101,16 @@ export const CompName = (props: Iprops) => {
99101
});
100102
}
101103

104+
if (playgroundUrl) {
105+
items.push({
106+
text: trans("comp.menuViewPlayground"),
107+
onClick: () => {
108+
window.open(playgroundUrl, "_blank");
109+
},
110+
});
111+
}
112+
113+
102114
if (compInfo.isRemote) {
103115
items.push({
104116
text: trans("comp.menuUpgradeToLatest"),

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -378,16 +378,29 @@ let MTComp = (function () {
378378
useEffect(() => {
379379
if (rtmChannelResponse) {
380380
rtmClient.on("MessageFromPeer", function (message, peerId) {
381-
setRtmMessages(message.text);
381+
setRtmMessages((prevMessages: any[]) => {
382+
// Check if the messages array exceeds the maximum limit
383+
if (prevMessages.length >= 500) {
384+
prevMessages.pop(); // Remove the oldest message
385+
}
386+
return [...prevMessages, {"peermessage" : JSON.parse(message.text + ""), "from" : peerId}];
387+
});
382388
});
389+
383390
rtmChannelResponse.on("ChannelMessage", function (message, memberId) {
384-
setRtmMessages(message.text);
385-
dispatch(
386-
changeChildAction("messages", getData(rtmMessages).data, false)
387-
);
391+
setRtmMessages((prevMessages: any[]) => {
392+
// Check if the messages array exceeds the maximum limit
393+
if (prevMessages.length >= 500) {
394+
prevMessages.pop(); // Remove the oldest message
395+
}
396+
return [...prevMessages, {"channelmessage" : JSON.parse(message.text + ""), "from" : memberId}];
397+
});
398+
399+
dispatch(changeChildAction("messages", getData(rtmMessages).data, false));
388400
});
389401
}
390402
}, [rtmChannelResponse]);
403+
391404

392405
useEffect(() => {
393406
if (client) {
@@ -399,11 +412,11 @@ let MTComp = (function () {
399412
setUserLeft(user);
400413
});
401414
client.on("volume-indicator", (volumeInfos: any) => {
402-
if (volumeInfos.length == 0) return;
415+
if (volumeInfos.length === 0) return;
403416
volumeInfos.map((volumeInfo: any) => {
404417
const speaking = volumeInfo.level >= 30;
405418
if (
406-
volumeInfo.uid == userId &&
419+
volumeInfo.uid === userId &&
407420
props.localUser.value.speaking != speaking
408421
) {
409422
setLocalUserSpeaking(speaking);
@@ -671,21 +684,20 @@ MTComp = withMethodExposing(MTComp, [
671684
},
672685
execute: async (comp, values) => {
673686
if (!comp.children.meetingActive.getView().value) return;
674-
let otherData =
675-
values !== undefined && values[1] !== undefined ? values[1] : "";
676-
let toUsers: any =
687+
let messagedata =
677688
values !== undefined && values[0] !== undefined ? values[0] : "";
689+
let toUsers: any =
690+
values !== undefined && values[1] !== undefined ? values[1] : "";
678691

679692
let message: any = {
680693
time: Date.now(),
681-
from: comp.children.localUser.getView().value,
694+
message: messagedata,
682695
};
683-
message["data"] = otherData;
684696

685697
if (toUsers.length > 0 && toUsers[0] !== undefined) {
686-
let peers = toUsers?.map((u: any) => u.user);
687-
peers.forEach((p: any) => {
688-
sendPeerMessageRtm(message, String(p));
698+
toUsers.forEach((peer: any) => {
699+
message.to = peer;
700+
sendPeerMessageRtm(message, String(peer));
689701
});
690702
} else {
691703
sendMessageRtm(message);

client/packages/lowcoder/src/comps/utils/compDocUtil.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ export function getComponentDocUrl(compType: UICompType) {
1212
return trans("docUrls.components", { compType });
1313
}
1414
}
15+
export function getComponentPlaygroundUrl(compType: UICompType) {
16+
if (!compType) {
17+
return "";
18+
}
19+
switch (compType) {
20+
case "module":
21+
return trans("docUrls.module");
22+
default:
23+
return trans("playground.url", { compType });
24+
}
25+
}

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ export const en = {
319319
validate: "Validation message",
320320
border: "Border",
321321
borderRadius: "Border radius",
322+
borderwidth: "Border width",
322323
background: "Background",
323324
headerBackground: "Header background",
324325
footerBackground: "Footer background",
@@ -906,6 +907,7 @@ export const en = {
906907
},
907908
comp: {
908909
menuViewDocs: "View documentation",
910+
menuViewPlayground: "View playground",
909911
menuUpgradeToLatest: "Upgrade to latest version",
910912
nameNotEmpty: "Can not be empty",
911913
nameRegex:
@@ -2273,13 +2275,13 @@ export const en = {
22732275
},
22742276
docUrls: {
22752277
docHome: "https://docs.lowcoder.cloud/",
2276-
components: "https://app.lowcoder.cloud/components?n={compType}",
2277-
module: "",
2278+
components: "https://app.lowcoder.cloud/components/{compType}",
2279+
module: "https://docs.lowcoder.cloud/lowcoder-documentation/build-applications/create-a-new-app/modules",
22782280
optionList: "",
2279-
terms: "",
2280-
privacy: "",
2281-
aboutUs: "",
2282-
changeLog: "",
2281+
terms: "https://lowcoder.cloud/terms",
2282+
privacy: "https://lowcoder.cloud/privacy",
2283+
aboutUs: "https://lowcoder.cloud/about",
2284+
changeLog: "https://github.com/lowcoder-org/lowcoder/releases",
22832285
introVideo: "",
22842286
devNpmPlugin:
22852287
"https://docs.lowcoder.cloud/lowcoder-extension/develop-data-source-plugins",
@@ -2536,6 +2538,7 @@ export const en = {
25362538
justify: "Justify both ends",
25372539
},
25382540
playground: {
2541+
url: "https://app.lowcoder.cloud/playground/{compType}/1",
25392542
data: "Data",
25402543
preview: "Preview",
25412544
property: "Properties",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ uiComp: {
853853
},
854854
comp: {
855855
menuViewDocs: "查看文档",
856+
menuViewPlayground: "查看组件游乐场",
856857
menuUpgradeToLatest: "升级到最新版本",
857858
nameNotEmpty: "不能为空",
858859
nameRegex: "必须以字母开头,只能包含字母、数字和下划线(_)",
@@ -2107,7 +2108,7 @@ toggleButton: {
21072108
},
21082109
docUrls: {
21092110
docHome: "https://docs.lowcoder.cloud/",
2110-
components: "https://app.lowcoder.cloud/components?n={compType}",
2111+
components: "https://app.lowcoder.cloud/components/{compType}",
21112112
module: "",
21122113
optionList: "",
21132114
terms: "",
@@ -2392,6 +2393,7 @@ componentDoc: {
23922393
justify: "两端对齐",
23932394
},
23942395
playground: {
2396+
url: "https://app.lowcoder.cloud/playground/{compType}/1",
23952397
data: "数据",
23962398
preview: "预览",
23972399
property: "属性",

deploy/docker/Dockerfile

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,17 @@ CMD [ "sh" , "/lowcoder/api-service/entrypoint.sh" ]
6666
##
6767
FROM ubuntu:jammy as build-node-service
6868

69-
RUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl ca-certificates build-essential
69+
RUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl ca-certificates build-essential gnupg
70+
71+
# Add nodejs repo and keys
72+
RUN mkdir -p /etc/apt/keyrings \
73+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
74+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
7075

7176
# Download nodejs and install yarn
72-
RUN curl -sL https://deb.nodesource.com/setup_19.x | bash - \
73-
&& apt-get install --no-install-recommends -y nodejs \
74-
&& npm install -g yarn
77+
RUN apt-get update \
78+
&& apt-get install --no-install-recommends -y nodejs \
79+
&& npm install -g yarn
7580

7681
# Copy and build the node-service app
7782
COPY server/node-service/ /lowcoder/node-service/app/
@@ -93,9 +98,16 @@ RUN chmod +x /lowcoder/node-service/*.sh
9398
FROM ubuntu:jammy as lowcoder-ce-node-service
9499
LABEL maintainer="lowcoder"
95100

96-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl ca-certificates \
97-
&& curl -sL https://deb.nodesource.com/setup_19.x | bash - \
98-
&& apt-get install --no-install-recommends -y nodejs gosu \
101+
RUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl ca-certificates gnupg
102+
103+
# Add nodejs repo and keys
104+
RUN mkdir -p /etc/apt/keyrings \
105+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
106+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
107+
108+
# Download nodejs and install yarn
109+
RUN apt-get update \
110+
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y nodejs gosu \
99111
&& npm install -g yarn \
100112
&& rm -rf /var/cache/apt/lists \
101113
&& addgroup --system --gid 9001 lowcoder \
@@ -167,13 +179,20 @@ EXPOSE 3443
167179
FROM lowcoder-ce-frontend
168180
LABEL maintainer="lowcoder"
169181

182+
RUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl ca-certificates gnupg
183+
184+
# Add nodejs repo and keys
185+
RUN mkdir -p /etc/apt/keyrings \
186+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
187+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
188+
189+
170190
# Install required packages
171191
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y bash gnupg curl lsb-release \
172192
&& curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
173193
&& echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb bullseye main" | tee /etc/apt/sources.list.d/redis.list \
174194
&& curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-archive-keyring.gpg \
175195
&& echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg arch=amd64,arm64] http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
176-
&& curl -sL https://deb.nodesource.com/setup_19.x | bash - \
177196
&& if [ "$(dpkg --print-architecture)" = "amd64" ] || [ "$(dpkg --print-architecture)" = "i386" ]; then \
178197
curl -sL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb --output libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb; \
179198
else \

server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/Oauth2KeycloakAuthConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.lowcoder.sdk.auth;
22

3-
import static org.lowcoder.sdk.auth.constants.Oauth2Constants.INSTANCE_ID_PLACEHOLDER;
3+
import static org.lowcoder.sdk.auth.constants.Oauth2Constants.BASE_URL_PLACEHOLDER;
44
import static org.lowcoder.sdk.auth.constants.Oauth2Constants.REALM_PLACEHOLDER;
55

66
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -15,7 +15,7 @@
1515
@Getter
1616
public class Oauth2KeycloakAuthConfig extends Oauth2SimpleAuthConfig
1717
{
18-
protected String instanceId;
18+
protected String baseUrl;
1919
protected String realm;
2020

2121
@JsonCreator
@@ -27,12 +27,12 @@ public Oauth2KeycloakAuthConfig(
2727
@JsonProperty("sourceName") String sourceName,
2828
@JsonProperty("clientId") String clientId,
2929
@JsonProperty("clientSecret") String clientSecret,
30-
@JsonProperty("instanceId") String instanceId,
30+
@JsonProperty("baseUrl") String baseUrl,
3131
@JsonProperty("realm") String realm,
3232
@JsonProperty("authType") String authType)
3333
{
3434
super(id, enable, enableRegister, source, sourceName, clientId, clientSecret, authType);
35-
this.instanceId = instanceId;
35+
this.baseUrl = baseUrl;
3636
this.realm = realm;
3737
}
3838

@@ -42,7 +42,7 @@ public Oauth2KeycloakAuthConfig(
4242
public String replaceAuthUrlClientIdPlaceholder(String url)
4343
{
4444
return super.replaceAuthUrlClientIdPlaceholder(url)
45-
.replace(INSTANCE_ID_PLACEHOLDER, instanceId)
45+
.replace(BASE_URL_PLACEHOLDER, baseUrl)
4646
.replace(REALM_PLACEHOLDER, realm);
4747
}
4848

server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/Oauth2OryAuthConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.lowcoder.sdk.auth;
22

3-
import static org.lowcoder.sdk.auth.constants.Oauth2Constants.INSTANCE_ID_PLACEHOLDER;
3+
import static org.lowcoder.sdk.auth.constants.Oauth2Constants.BASE_URL_PLACEHOLDER;
44

55
import javax.annotation.Nullable;
66

@@ -14,7 +14,7 @@
1414
@Getter
1515
public class Oauth2OryAuthConfig extends Oauth2SimpleAuthConfig {
1616

17-
protected String instanceId;
17+
protected String baseUrl;
1818

1919
@JsonCreator
2020
public Oauth2OryAuthConfig(
@@ -25,14 +25,14 @@ public Oauth2OryAuthConfig(
2525
String sourceName,
2626
String clientId,
2727
String clientSecret,
28-
String instanceId,
28+
String baseUrl,
2929
String authType) {
3030
super(id, enable, enableRegister, source, sourceName, clientId, clientSecret, authType);
31-
this.instanceId = instanceId;
31+
this.baseUrl = baseUrl;
3232
}
3333

3434
@Override
3535
public String replaceAuthUrlClientIdPlaceholder(String url) {
36-
return super.replaceAuthUrlClientIdPlaceholder(url).replace(INSTANCE_ID_PLACEHOLDER, instanceId);
36+
return super.replaceAuthUrlClientIdPlaceholder(url).replace(BASE_URL_PLACEHOLDER, baseUrl);
3737
}
3838
}

server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/constants/Oauth2Constants.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class Oauth2Constants {
88
public static final String STATE_PLACEHOLDER = "$STATE";
99
public static final String REALM_PLACEHOLDER = "$REALM";
1010

11-
public static final String INSTANCE_ID_PLACEHOLDER = "$INSTANCE_ID";
11+
public static final String BASE_URL_PLACEHOLDER = "$BASE_URL";
1212

1313
// authorize url
1414
public static final String GITHUB_AUTHORIZE_URL = "https://github.com/login/oauth/authorize"
@@ -27,14 +27,14 @@ public class Oauth2Constants {
2727
+ "&scope=openid email profile"
2828
+ "&prompt=select_account";
2929

30-
public static final String ORY_AUTHORIZE_URL = "https://" + INSTANCE_ID_PLACEHOLDER + "/oauth2/auth"
30+
public static final String ORY_AUTHORIZE_URL = BASE_URL_PLACEHOLDER + "/oauth2/auth"
3131
+ "?response_type=code"
3232
+ "&client_id=" + CLIENT_ID_PLACEHOLDER
3333
+ "&redirect_uri=" + REDIRECT_URL_PLACEHOLDER
3434
+ "&state=" + STATE_PLACEHOLDER
3535
+ "&scope=openid email profile offline_access";
3636

37-
public static final String KEYCLOAK_AUTHORIZE_URL = "https://" + INSTANCE_ID_PLACEHOLDER + "/realms/" + REALM_PLACEHOLDER + "/protocol/openid-connect/auth"
37+
public static final String KEYCLOAK_AUTHORIZE_URL = BASE_URL_PLACEHOLDER + "/realms/" + REALM_PLACEHOLDER + "/protocol/openid-connect/auth"
3838
+ "?response_type=code"
3939
+ "&client_id=" + CLIENT_ID_PLACEHOLDER
4040
+ "&redirect_uri=" + REDIRECT_URL_PLACEHOLDER

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy