Skip to content

Commit 211c50d

Browse files
author
FalkWolsky
committedMar 19, 2024
Google Fonts & Clearbit only on public Cloud
1 parent 90679f9 commit 211c50d

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed
 

‎client/packages/lowcoder/index.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"/>
66
<meta lang="en" name="description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
7-
<meta name="theme-color" content="#000000" />
8-
<meta property="iframely:title" content="Lowcoder" />
9-
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
10-
<!-- Added Montserrat google font link to test font family style property for components -->
11-
<link rel="preconnect" href="https://fonts.googleapis.com">
12-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13-
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
7+
<meta name="theme-color" content="#000000" />
148
<style>
159
html,
1610
body {

‎client/packages/lowcoder/src/app.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ class AppIndex extends React.Component<AppIndexProps, any> {
9696
render() {
9797
const isTemplate = hasQueryParam("template");
9898
const pathname = history.location.pathname;
99+
100+
// we check if we are on the public cloud
101+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
102+
99103
// make sure all users in this app have checked login info
100104
if (!this.props.isFetchUserFinished) {
101105
const hideLoadingHeader = isTemplate || isAuthUnRequired(pathname);
@@ -107,6 +111,21 @@ class AppIndex extends React.Component<AppIndexProps, any> {
107111
{<title>{this.props.brandName}</title>}
108112
{<link rel="icon" href={this.props.favicon} />}
109113
<meta name="description" content={trans("productDesc")} />
114+
115+
{isLowCoderDomain && (
116+
<>
117+
{/* setting Meta Attributes to be able for embedding via iframely */}
118+
<meta property="iframely:title" content="Lowcoder" />
119+
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
120+
121+
<link rel="preconnect" href="https://fonts.googleapis.com"/>
122+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>
123+
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet"/>
124+
{/* embedding analytics of Cleabits */}
125+
<script src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin"></script>
126+
</>
127+
)}
128+
110129
</Helmet>
111130
<SystemWarning />
112131
<Router history={history}>

0 commit comments

Comments
 (0)