Skip to content

Dev -> Main for v2.1.5 #488

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 17 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix branding by ENV
  • Loading branch information
FalkWolsky committed Nov 10, 2023
commit 39dbe795dd640e454b910a7b00304e36345048b2
8 changes: 2 additions & 6 deletions client/packages/lowcoder-cli/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ declare module "*.svg" {
React.SVGProps<SVGSVGElement> & { title?: string }
>;

const src: string;
export default src;
// const src: string;
// export default src;
}

declare module "*.md" {
Expand All @@ -31,10 +31,6 @@ 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 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
16 changes: 0 additions & 16 deletions client/packages/lowcoder-dev-utils/buildVars.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ export const buildVars = [
name: "REACT_APP_API_HOST",
defaultValue: "",
},
{
name: "REACT_APP_LOWCODER_SHOW_BRAND",
defaultValue: 'false',
},
{
name: "REACT_APP_LOWCODER_CUSTOM_LOGO",
defaultValue: '',
},
{
name: "REACT_APP_LOWCODER_CUSTOM_LOGO_SQUARE",
defaultValue: '',
},
{
name: "REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT",
defaultValue: '',
},
{
name: "LOWCODER_NODE_SERVICE_URL",
defaultValue: "",
Expand Down
6 changes: 0 additions & 6 deletions client/packages/lowcoder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,5 @@
<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>
4 changes: 0 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,6 @@ 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 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
11 changes: 5 additions & 6 deletions client/packages/lowcoder/src/components/PageSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,13 @@ export default function PageSkeleton(props: IProps) {
</SkeletonWrapper>
);

// {/* headerStart={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} />} */}

return (
<Layout>
{!hideHeader && isHeaderReady && (
<Header
headerStart={
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} />
}
<Header
headerStart={<StyledLogoWithName branding={true} />}
style={{ backgroundColor: brandingConfig?.headerColor, ...props.headStyle }}
/>
)}
Expand All @@ -95,5 +93,6 @@ export default function PageSkeleton(props: IProps) {
<MainContent>{!hideContent && skeleton}</MainContent>
</Layout>
</Layout>

);
}
4 changes: 0 additions & 4 deletions client/packages/lowcoder/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ 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();
Expand Down
10 changes: 4 additions & 6 deletions client/packages/lowcoder/src/pages/common/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,8 @@ export default function Header(props: HeaderProps) {
const headerStart = (
<>
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
{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 />}
{/* {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 />} */}
<LogoHome />
</StyledLink>
{editName ? (
<Wrapper>
Expand Down Expand Up @@ -434,9 +433,8 @@ export function AppHeader() {
const brandingConfig = useSelector(getBrandingConfig);
const headerStart = (
<StyledLink onClick={() => history.push(ALL_APPLICATIONS_URL)}>
{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 />}
{/* {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 />} */}
<LogoHome />
</StyledLink>
);
const headerEnd = <HeaderProfile user={user} />;
Expand Down
9 changes: 2 additions & 7 deletions client/packages/lowcoder/src/pages/userAuth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,8 @@ function Login() {
loginCardView = thirdPartyLoginView;
}

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

const loginSubHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? trans("userAuth.poweredByLowcoder")
: ''
const loginHeading = getLoginTitle(inviteInfo?.createUserName, systemConfig?.branding?.brandName)
const loginSubHeading = '' // REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== "" ? trans("userAuth.poweredByLowcoder") : ''

return (
<AuthContainer
Expand Down
9 changes: 2 additions & 7 deletions client/packages/lowcoder/src/pages/userAuth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,8 @@ function UserRegister() {
return null;
}

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

const registerSubHeading = REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== ""
? trans("userAuth.poweredByLowcoder")
: ''
const registerHeading = trans("userAuth.register") // REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== "" ? REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT : trans("userAuth.register")
const registerSubHeading = '' // REACT_APP_LOWCODER_CUSTOM_AUTH_WELCOME_TEXT !== "" ? trans("userAuth.poweredByLowcoder") : ''

return (
<AuthContainer
Expand Down