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

Commite013a68

Browse files
allow option to set FE url and org-id in embedded apps
1 parent7584d20 commite013a68

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

‎client/packages/lowcoder-sdk-webpack-bundle/index.jsx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ for (
3737
[i]?.querySelector(".locoder-backend-url")?.value||
3838
"https://api-service.lowcoder.cloud"
3939
}
40+
webUrl={
41+
document
42+
.querySelectorAll(".lowcoder-module-container")
43+
[i]?.querySelector(".locoder-frontend-url")?.value||
44+
"https://app.lowcoder.cloud"
45+
}
46+
orgId={
47+
document
48+
.querySelectorAll(".lowcoder-module-container")
49+
[i]?.querySelector(".locoder-org-id")?.value||
50+
undefined
51+
}
4052
/>
4153
);
4254
}

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface AppViewInstanceOptions<I = any> {
3535
baseUrl?:string;
3636
webUrl?:string;
3737
moduleInputs?:I;
38+
orgId?:string;
3839
}
3940

4041
letisAuthButtonClicked=false;
@@ -55,6 +56,9 @@ export class AppViewInstance<I = any, O = any> {
5556
if(this.options.baseUrl){
5657
sdkConfig.baseURL=this.options.baseUrl;
5758
}
59+
if(this.options.webUrl){
60+
sdkConfig.webUrl=this.options.webUrl;
61+
}
5862

5963
this.dataPromise=this.loadData();
6064
this.render();
@@ -86,7 +90,7 @@ export class AppViewInstance<I = any, O = any> {
8690
[AuthSearchParams.redirectUrl]:encodeURIComponent(window.location.href),
8791
[AuthSearchParams.loginType]:null,
8892
})
89-
// window.location.href = `${webUrl}${AUTH_LOGIN_URL}`;
93+
9094
this.authorizedUser=false;
9195
return{
9296
data:{
@@ -155,6 +159,10 @@ export class AppViewInstance<I = any, O = any> {
155159

156160
privateasyncrender(){
157161
constdata=awaitthis.dataPromise;
162+
constloginUrl=this.options.orgId
163+
?`${this.options.webUrl}/org/${this.options.orgId}/auth/login`
164+
:`${this.options.webUrl}${AUTH_LOGIN_URL}`;
165+
158166
this.root.render(
159167
this.authorizedUser ?(
160168
<StyleSheetManagertarget={this.nodeasHTMLElement}>
@@ -177,7 +185,7 @@ export class AppViewInstance<I = any, O = any> {
177185
buttonType="primary"
178186
onClick={()=>{
179187
isAuthButtonClicked=true;
180-
window.open(`${this.options.webUrl}${AUTH_LOGIN_URL}`,'_blank');
188+
window.open(loginUrl,'_blank');
181189
this.render();
182190
}}
183191
>

‎client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnBooleanComp.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const Wrapper = styled.div`
2020
`;
2121

2222
constIconWrapper=styled.div<{$style:CheckboxStyleType;$ifChecked:boolean}>`
23+
pointer-events: none;
2324
height: 22px;
2425
svg {
2526
width: 14px;
@@ -87,7 +88,10 @@ export const BooleanComp = (function () {
8788
constCheckBoxComp=()=>{
8889
conststyle=useStyle(CheckboxStyle);
8990
return(
90-
<IconWrapper$style={style}$ifChecked={value}>
91+
<IconWrapper
92+
$style={style}
93+
$ifChecked={value}
94+
>
9195
{value ?(
9296
<TableCheckedIcon/>
9397
) :props.falseValues==="x" ?(
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
interfaceSDKConfig{
22
baseURL:string;
3+
webUrl:string;
34
}
45

56
exportconstsdkConfig:SDKConfig={
67
baseURL:"",
8+
webUrl:"",
79
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp