Skip to content

Commit 6fafbae

Browse files
committed
Merge branch 'ee-setup' of github.com:lowcoder-org/lowcoder into ui/environments
2 parents d3e2262 + da22a64 commit 6fafbae

File tree

6 files changed

+752
-418
lines changed

6 files changed

+752
-418
lines changed

client/packages/lowcoder/src/app.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ type AppIndexProps = {
127127
fetchServerSettings: () => void;
128128
favicon: string;
129129
brandName: string;
130+
brandDescription: string;
130131
uiLanguage: string;
131132
brandingFontFamily?: string;
132133
};
@@ -183,7 +184,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
183184
<Helmet>
184185
{<title>{this.props.brandName}</title>}
185186
{<link rel="icon" href={this.props.favicon} />}
186-
<meta name="description" content={trans('productDesc')} />
187+
<meta name="description" content={this.props.brandDescription} />
187188
<meta
188189
name="keywords"
189190
content="Lowcoder, Applications, App Builder, Internal Applications, Websites, Dashboards, Data Visualization, Customer Applications, CRM, ERP, eCommerce, VideoMeeting, Rapid Development"
@@ -199,7 +200,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
199200
<meta
200201
key="og:description"
201202
property="og:description"
202-
content={trans('productDesc')}
203+
content={this.props.brandDescription}
203204
/>
204205
<meta
205206
key="og:image"
@@ -222,7 +223,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
222223
<meta
223224
key="twitter:description"
224225
name="twitter:description"
225-
content={trans('productDesc')}
226+
content={this.props.brandDescription}
226227
/>
227228
<meta
228229
key="twitter:image"
@@ -295,7 +296,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
295296
<meta
296297
key="iframely:description"
297298
property="iframely:description"
298-
content={trans('productDesc')}
299+
content={this.props.brandDescription}
299300
/>,
300301
<link
301302
key="iframely"
@@ -489,7 +490,8 @@ const mapStateToProps = (state: AppState) => ({
489490
favicon: getBrandingConfig(state)?.favicon
490491
? buildMaterialPreviewURL(getBrandingConfig(state)?.favicon!)
491492
: favicon,
492-
brandName: getBrandingConfig(state)?.brandName ?? trans("productName"),
493+
brandName: getBrandingSetting(state)?.config_set?.standardTitle ?? trans("productName"),
494+
brandDescription: getBrandingSetting(state)?.config_set?.standardDescription ?? trans('productDesc'),
493495
uiLanguage: state.ui.users.user.uiLanguage,
494496
brandingFontFamily: getBrandingSetting(state)?.config_set?.font,
495497
});

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const StyledErrorIcon = styled(ExclamationCircleFilled)`
2929

3030
const StyledErrorText = styled.h2`
3131
margin: 1rem 0;
32+
text-align: center;
3233
`;
3334

3435
const DefaultErrorMessage = 'Something went wrong while displaying this webpage';
@@ -45,7 +46,7 @@ const ErrorFallback = (props: {
4546
}, [props.errorMessage, brandingSettings?.config_set?.errorPageText]);
4647

4748
const errorImage = useMemo(() => {
48-
const imageUrl = brandingSettings?.config_set?.signUpPageImage || '';
49+
const imageUrl = brandingSettings?.config_set?.errorPageImage || '';
4950
if (Boolean(brandingSettings?.orgId)) {
5051
return buildMaterialPreviewURL(imageUrl);
5152
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,8 +3060,8 @@ export const en = {
30603060
"colorFontSection": "Colors and Fonts",
30613061
"mainBrandingColor": "Main Branding Color",
30623062
"mainBrandingColorHelp": "Choose the primary color for your branding.",
3063-
"editorHeaderColor": "Editor Header Color",
3064-
"editorHeaderColorHelp": "Choose the color for the editor's header.",
3063+
"editorHeaderColor": "App Header Color",
3064+
"editorHeaderColorHelp": "Choose the color for the app's header.",
30653065
"adminSidebarColor": "Admin Sidebar Color",
30663066
"adminSidebarColorHelp": "Choose the color for the admin's sidebar.",
30673067
"adminSidebarFontColor": "Admin Sidebar Font Color",
@@ -3114,7 +3114,8 @@ export const en = {
31143114
"whatsNewLinkPlaceholder": "Enter the URL for your documentation...",
31153115
"whatsNewLinkHelp": "Provide a valid URL that users can visit for your news.",
31163116
"deleteBranding": "Delete Branding",
3117-
"deleteBrandingContent": "Are you sure you want to delete \"{orgName}\" branding?"
3117+
"deleteBrandingContent": "Are you sure you want to delete \"{orgName}\" branding?",
3118+
"fetchBrandingError": "Something went wrong while fetching branding details. Please try again."
31183119
},
31193120
"networkMessage": {
31203121
"200": "Success",

client/packages/lowcoder/src/pages/common/header.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ export default function Header(props: HeaderProps) {
440440
<>
441441
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
442442
{/* {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 />} */}
443-
{ brandingSettings?.config_set?.squareLogo
443+
{ brandingSettings?.config_set?.logo
444444
? (
445445
Boolean(brandingSettings?.orgId)
446-
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.squareLogo)} />
447-
: <BrandLogo src={brandingSettings?.config_set?.squareLogo} />
446+
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.logo)} />
447+
: <BrandLogo src={brandingSettings?.config_set?.logo} />
448448
) : <LogoHome />
449449
}
450450
</StyledLink>
@@ -706,11 +706,11 @@ export function AppHeader() {
706706
const headerStart = (
707707
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
708708
{/* {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 />} */}
709-
{ brandingSettings?.config_set?.squareLogo
709+
{ brandingSettings?.config_set?.logo
710710
? (
711711
Boolean(brandingSettings?.orgId)
712-
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.squareLogo)} />
713-
: <BrandLogo src={brandingSettings?.config_set?.squareLogo} />
712+
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.logo)} />
713+
: <BrandLogo src={brandingSettings?.config_set?.logo} />
714714
) : <LogoHome />
715715
}
716716
</StyledLink>

client/packages/lowcoder/src/pages/common/previewHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ const PreviewHeaderComp = () => {
163163
<>
164164
<StyledLink onClick={() => !isPublicApp && history.push(ALL_APPLICATIONS_URL)}>
165165
{/* <LogoIcon branding={true} /> */}
166-
{ brandingSettings?.config_set?.squareLogo
166+
{ brandingSettings?.config_set?.logo
167167
? (
168168
Boolean(brandingSettings?.orgId)
169-
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.squareLogo)} />
170-
: <BrandLogo src={brandingSettings?.config_set?.squareLogo} />
169+
? <BrandLogo src={buildMaterialPreviewURL(brandingSettings?.config_set?.logo)} />
170+
: <BrandLogo src={brandingSettings?.config_set?.logo} />
171171
) : <LogoIcon branding={true} />
172172
}
173173
</StyledLink>

0 commit comments

Comments
 (0)