Skip to content

Dev -> Main v2.1.4 #480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/packages/lowcoder-cli/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ declare var REACT_APP_LANGUAGES: string;
declare var REACT_APP_COMMIT_ID: string;
declare var REACT_APP_API_HOST: string;
declare var LOWCODER_NODE_SERVICE_URL: string;
declare var LOWCODER_SHOW_BRAND: string;
declare var LOWCODER_CUSTOM_LOGO: string;
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
declare var LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
declare var REACT_APP_LOWCODER_SHOW_BRAND: string;
declare var REACT_APP_LOWCODER_CUSTOM_LOGO: string;
declare var REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE: string;
declare var REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
declare var REACT_APP_ENV: string;
declare var REACT_APP_BUILD_ID: string;
declare var REACT_APP_LOG_LEVEL: string;
Expand Down
12 changes: 6 additions & 6 deletions client/packages/lowcoder-dev-utils/buildVars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ export const buildVars = [
defaultValue: "",
},
{
name: "LOWCODER_SHOW_BRAND",
name: "REACT_APP_LOWCODER_SHOW_BRAND",
defaultValue: 'false',
},
{
name: "LOWCODER_CUSTOM_LOGO",
name: "REACT_APP_LOWCODER_CUSTOM_LOGO",
defaultValue: '',
},
{
name: "LOWCODER_CUSTOM_LOGO_SQUARE",
name: "REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE",
defaultValue: '',
},
{
name: "LOWCODER_NODE_SERVICE_URL",
defaultValue: "",
name: "REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT",
defaultValue: '',
},
{
name: "LOWCODER_CUSTOM_AUTH_WELCOME_TEXT",
name: "LOWCODER_NODE_SERVICE_URL",
defaultValue: "",
},
{
Expand Down
6 changes: 6 additions & 0 deletions client/packages/lowcoder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,11 @@
<div id="root"></div>
<script type="module" src="/src/index.ts"></script>
<!-- <%- browserCheckScript %> -->
<script>
window.lowcoder_show_brand = "<%= process.env.REACT_APP_LOWCODER_SHOW_BRAND %>";
window.lowcoder_custom_auth_welcome_text = "<%= process.env.REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT %>";
window.lowcoder_custom_logo = "<%= process.env.REACT_APP_LOWCODER_CUSTOM_LOGO %>";
window.lowcoder_custom_logo_square = "<%= process.env.REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE %>";
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion client/packages/lowcoder/src/api/configApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ConfigApi extends Api {
static fetchConfig(orgId?: string): AxiosPromise<ConfigResponse> {
let authConfigURL = ConfigApi.configURL;
if(orgId?.length) {
authConfigURL += `?orgId?=${orgId}`;
authConfigURL += `?orgId=${orgId}`;
}
return Api.get(authConfigURL);
}
Expand Down
8 changes: 4 additions & 4 deletions client/packages/lowcoder/src/app-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ declare var REACT_APP_LANGUAGES: string;
declare var REACT_APP_COMMIT_ID: string;
declare var REACT_APP_API_HOST: string;
declare var LOWCODER_NODE_SERVICE_URL: string;
declare var LOWCODER_SHOW_BRAND: string;
declare var LOWCODER_CUSTOM_LOGO: string;
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
declare var LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
declare var REACT_APP_LOWCODER_SHOW_BRAND: string;
declare var REACT_APP_LOWCODER_CUSTOM_LOGO: string;
declare var REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE: string;
declare var REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT: string;
declare var REACT_APP_ENV: string;
declare var REACT_APP_BUILD_ID: string;
declare var REACT_APP_LOG_LEVEL: string;
Expand Down
4 changes: 2 additions & 2 deletions client/packages/lowcoder/src/components/PageSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export default function PageSkeleton(props: IProps) {
{!hideHeader && isHeaderReady && (
<Header
headerStart={
LOWCODER_SHOW_BRAND === 'true' ?
LOWCODER_CUSTOM_LOGO !== "" ? <img src={LOWCODER_CUSTOM_LOGO} alt="logo" /> :<StyledLogoWithName branding={true} /> :
REACT_APP_LOWCODER_SHOW_BRAND === 'true' ?
REACT_APP_LOWCODER_CUSTOM_LOGO !== "" ? <img src={REACT_APP_LOWCODER_CUSTOM_LOGO} alt="logo" /> :<StyledLogoWithName branding={true} /> :
<StyledLogoHome branding={true} />
}
style={{ backgroundColor: brandingConfig?.headerColor, ...props.headStyle }}
Expand Down
6 changes: 5 additions & 1 deletion client/packages/lowcoder/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ debug(`REACT_APP_LANGUAGES:, ${REACT_APP_LANGUAGES}`);
debug(`REACT_APP_API_HOST:, ${REACT_APP_API_HOST}`);
debug(`REACT_APP_ENV:, ${REACT_APP_ENV}`);
debug(`REACT_APP_LOG_LEVEL:, ${REACT_APP_LOG_LEVEL}`);

debug(`REACT_APP_LOWCODER_SHOW_BRAND:, ${REACT_APP_LOWCODER_SHOW_BRAND}`);
debug(`REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT:, ${REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT}`);
debug(`LOWCODER_CUSTOM_LOGO:, ${REACT_APP_LOWCODER_CUSTOM_LOGO}`);
debug(`LOWCODER_CUSTOM_LOGO_SQUARE:, ${REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE}`);

try {
bootstrap();
hideLoading();
Expand Down
8 changes: 4 additions & 4 deletions client/packages/lowcoder/src/pages/common/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ export default function Header(props: HeaderProps) {
const headerStart = (
<>
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
{LOWCODER_SHOW_BRAND === 'true' ?
LOWCODER_CUSTOM_LOGO_SQUARE !== "" ? <img src={LOWCODER_CUSTOM_LOGO_SQUARE } height={24} width={24} alt="logo" /> :<LogoIcon /> :
{REACT_APP_LOWCODER_SHOW_BRAND === 'true' ?
REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE !== "" ? <img src={REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE } height={24} width={24} alt="logo" /> :<LogoIcon /> :
<LogoHome />}
</StyledLink>
{editName ? (
Expand Down Expand Up @@ -434,8 +434,8 @@ export function AppHeader() {
const brandingConfig = useSelector(getBrandingConfig);
const headerStart = (
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
{LOWCODER_SHOW_BRAND === 'true' ?
LOWCODER_CUSTOM_LOGO !== "" ? <img src={LOWCODER_CUSTOM_LOGO} height={28} alt="logo" /> :<LogoWithName branding={!user.orgDev} /> :
{REACT_APP_LOWCODER_SHOW_BRAND === 'true' ?
REACT_APP_LOWCODER_CUSTOM_LOGO !== "" ? <img src={REACT_APP_LOWCODER_CUSTOM_LOGO} height={28} alt="logo" /> :<LogoWithName branding={!user.orgDev} /> :
<LogoHome />}
</StyledLink>
);
Expand Down
4 changes: 2 additions & 2 deletions client/packages/lowcoder/src/pages/setting/idSource/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export const IdSourceList = (props: any) => {
const enableEnterpriseLogin = useSelector(selectSystemConfig)?.featureFlag?.enableEnterpriseLogin;

useEffect(() => {
if (!currentOrgId || (!isSelfDomain(config) && !isEnterpriseMode(config))) {
if (!currentOrgId) {
return;
}
getConfigs();
}, [currentOrgId]);

if (!currentOrgId || (!isSelfDomain(config) && !isEnterpriseMode(config))) {
if (!currentOrgId) {
return null;
}

Expand Down
9 changes: 2 additions & 7 deletions client/packages/lowcoder/src/pages/setting/settingHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@ export function SettingHome() {
{
key: SettingPageEnum.OAuthProvider,
label: (
<span>
<span className="text">{trans("settings.oauthProviders")}</span>
{(!currentOrgAdmin(user) || (!isSelfDomain(config) && !isEnterpriseMode(config))) && (
<FreeLimitTag text={trans("settings.premium")} />
)}
</span>
<span className="text">{trans("settings.oauthProviders")}</span>
),
disabled: !currentOrgAdmin(user) || (!isSelfDomain(config) && !isEnterpriseMode(config)),
disabled: !currentOrgAdmin(user),
},
{
key: SettingPageEnum.Environments,
Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder/src/pages/userAuth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ function Login() {
loginCardView = thirdPartyLoginView;
}

const loginHeading = organizationId && LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? LOWCODER_CUSTOM_AUTH_WELCOME_TEXT
const loginHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT
: getLoginTitle(inviteInfo?.createUserName, systemConfig?.branding?.brandName)

const loginSubHeading = organizationId && LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
const loginSubHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? trans("userAuth.poweredByLowcoder")
: ''

Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder/src/pages/userAuth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ function UserRegister() {
return null;
}

const registerHeading = organizationId && LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? LOWCODER_CUSTOM_AUTH_WELCOME_TEXT
const registerHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT
: trans("userAuth.register")

const registerSubHeading = organizationId && LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
const registerSubHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? trans("userAuth.poweredByLowcoder")
: ''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class CommonConfig {
private boolean cloud;
private Security security = new Security();
private String version;
private String apiVersion;
private boolean blockHoundEnable;
private String cookieName;
private int maxQueryTimeout = 300;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public class OpenAPIDocsConfiguration {
private CommonConfig commonConfig;

@Bean
public OpenAPI customizeOpenAPI() {
OpenAPI customizeOpenAPI() {
final String securitySchemeName = commonConfig.getCookieName();
return new OpenAPI()
.info(new Info()
.title("Lowcoder API")
.version("1.0"))
.version(commonConfig.getApiVersion()))
.addServersItem(new Server()
.url("/"))
.addSecurityItem(new SecurityRequirement()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ spring:
mongodb:
authentication-database: admin
auto-index-creation: false
uri: mongodb://192.168.1.111:27017/lowcoder?authSource=admin
uri: mongodb://lowcoder:secret123@localhost:27017/lowcoder?authSource=admin
redis:
url: redis://192.168.1.111:6379
url: redis://localhost:6379
main:
allow-bean-definition-overriding: true
allow-circular-references: true
Expand Down Expand Up @@ -39,7 +39,8 @@ common:
security:
cors-allowed-domains:
- '*'
version: 1.1.8
version: 2.1.4
apiVersion: 1.1
block-hound-enable: false
js-executor:
host: http://127.0.0.1:6060
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ common:
default-value: lowcoder.org
cloud: false
version: 2.1.4
apiVersion: 1.1
block-hound-enable: false
js-executor:
host: ${LOWCODER_NODE_SERVICE_URL:http://127.0.0.1:6060}
Expand Down