Skip to content

Commit 49b9126

Browse files
author
FalkWolsky
committed
Adding Better News, Enterprise Form and Translations
1 parent 3a7ace3 commit 49b9126

File tree

18 files changed

+150
-54
lines changed

18 files changed

+150
-54
lines changed

client/packages/lowcoder-design/src/icons/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export { ReactComponent as RecyclerIcon } from "./remix/delete-bin-line.svg";
255255
export { ReactComponent as MarketplaceIcon } from "./v1/icon-application-marketplace.svg";
256256
export { ReactComponent as FavoritesIcon } from "./v1/icon-application-favorites.svg";
257257
export { ReactComponent as HomeSettingIcon } from "./remix/settings-4-line.svg";
258-
export { ReactComponent as EnterpriseIcon } from "./remix/earth-line.svg";
258+
export { ReactComponent as EnterpriseIcon } from "./remix/shield-star-line.svg";
259259
export { ReactComponent as VerticalIcon } from "./remix/vertical.svg";
260260
export { ReactComponent as HorizontalIcon } from "./remix/horizontal.svg";
261261

client/packages/lowcoder/src/api/newsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const getHubspotContent = async () => {
132132
};
133133
try {
134134
const result = await NewsApi.secureRequest(apiBody);
135-
return result?.data[0]?.hubspot?.length > 0 ? result.data[0].hubspot as any[] : [];
135+
return result?.data[0]?.results?.length > 0 ? result.data[0].results as any[] : [];
136136
} catch (error) {
137137
console.error("Error getting news:", error);
138138
throw error;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2458,8 +2458,10 @@ export const de = {
24582458
"usageLogDevices": "Gerät/OS Aufschlüsselung",
24592459
"usageLogBrowsers": "Browser/Layout Engine Aufschlüsselung",
24602460
"premiumFeaturesNotice": "Alle Premium Features sind in der Enterprise Edition von Lowcoder verfügbar.",
2461+
"readMoreNotice" : "Erfahren Sie mehr über die Enterprise Edition und wie Sie sie ganz einfach installieren können.",
2462+
"readMoreButton": "Details zur Enterprise Edition",
24612463
"requestLicense": "Lizenzen für die Enterprise Edition anfordern",
2462-
"requestLicensesBtton": "Request Enterprise Access",
2464+
"requestLicensesBtton": "Enterprise Edition anfragen",
24632465
"AuditLogsTitle": "Audit Logs",
24642466
"AuditLogsIntroTitle": "Leistungsstarker Einblick in die Aktivitäten Ihres Arbeitsbereichs",
24652467
"AuditLogsIntro1": "Mithilfe von Audit-Protokollen können Administratoren genau verfolgen, was auf der gesamten Lowcoder-Plattform passiert. Von Benutzeranmeldungen bis hin zu App-Änderungen wird jede relevante Aktion erfasst und gespeichert.",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,8 +2449,10 @@ export const en = {
24492449
"usageLogDevices" : "Device/OS Breakdown",
24502450
"usageLogBrowsers" : "Browser/Layout Engine Breakdown",
24512451
"premiumFeaturesNotice" : "All Premium Features are avilable in the Enterprise Edition of Lowcoder.",
2452+
"readMoreNotice" : "Learn more about the Enterprise Edition and how to install it easily.",
2453+
"readMoreButton" : "Enterprise Edition Details",
24522454
"requestLicense" : "Request Enterprise Edition Licenses",
2453-
"requestLicensesBtton" : "Request Enterprise Access",
2455+
"requestLicensesBtton" : "Unlock Enterprise Features",
24542456
"AuditLogsTitle": "Audit Logs",
24552457
"AuditLogsIntroTitle": "Powerful visibility into your workspace activity",
24562458
"AuditLogsIntro1": "Audit Logs enable administrators to track exactly what happens across the entire Lowcoder platform. From user sign-ins to app modifications, every relevant action is captured and stored.",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,8 @@ export const es = {
24582458
"usageLogDevices": "Desglose de dispositivos/OS",
24592459
"usageLogBrowsers": "Desglose del navegador/motor de diseño",
24602460
"premiumFeaturesNotice": "Todas las características Premium están disponibles en la Edición Enterprise de Lowcoder.",
2461+
"readMoreNotice" : "Conozca más sobre la edición Enterprise y cómo instalarla fácilmente.",
2462+
"readMoreButton": "Detalles de la edición Enterprise",
24612463
"requestLicense": "Solicitar licencias de Enterprise Edition",
24622464
"requestLicensesBtton": "Solicitar acceso para empresas",
24632465
"AuditLogsTitle": "Registros de auditoría",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,8 @@ export const it = {
24582458
"usageLogDevices": "Ripartizione dispositivi/OS",
24592459
"usageLogBrowsers": "Browser/Motore di layout",
24602460
"premiumFeaturesNotice": "Tutte le funzioni Premium sono disponibili nell'edizione Enterprise di Lowcoder.",
2461+
"readMoreNotice" : "Scopri di più sulla versione Enterprise e su come installarla facilmente.",
2462+
"readMoreButton": "Dettagli dell'edizione Enterprise",
24612463
"requestLicense": "Richiesta di licenze Enterprise Edition",
24622464
"requestLicensesBtton": "Richiesta di accesso aziendale",
24632465
"AuditLogsTitle": "Registri di controllo",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,8 @@ export const pt = {
24582458
"usageLogDevices": "Discriminação por dispositivo/SO",
24592459
"usageLogBrowsers": "Navegador/motor de apresentação",
24602460
"premiumFeaturesNotice": "Todas as funcionalidades Premium estão disponíveis na Enterprise Edition do Lowcoder.",
2461+
"readMoreNotice" : "Saiba mais sobre a edição Enterprise e como instalá-la com facilidade.",
2462+
"readMoreButton": "Detalhes da edição Enterprise",
24612463
"requestLicense": "Solicitar licenças da Enterprise Edition",
24622464
"requestLicensesBtton": "Pedir acesso à empresa",
24632465
"AuditLogsTitle": "Registos de auditoria",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,8 @@ export const ru = {
24582458
"usageLogDevices": "Разбивка по устройствам/ОС",
24592459
"usageLogBrowsers": "Разбивка браузера/программного обеспечения",
24602460
"premiumFeaturesNotice": "Все премиум-функции доступны в корпоративной версии Lowcoder.",
2461+
"readMoreNotice" : "Узнайте больше о версии Enterprise и о том, как легко её установить.",
2462+
"readMoreButton": "Подробности о версии Enterprise",
24612463
"requestLicense": "Запрос лицензий Enterprise Edition",
24622464
"requestLicensesBtton": "Запрос доступа к предприятию",
24632465
"AuditLogsTitle": "Журналы аудита",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,8 @@ export const zh = {
24592459
"usageLogDevices": "设备/操作系统明细",
24602460
"usageLogBrowsers": "浏览器/布局引擎细分",
24612461
"premiumFeaturesNotice": "Lowcoder 企业版可提供所有高级功能。",
2462+
"readMoreNotice" : "了解有关企业版的更多信息,以及如何轻松安装它。",
2463+
"readMoreButton": "企业版详情",
24622464
"requestLicense": "申请企业版许可证",
24632465
"requestLicensesBtton": "申请企业访问权限",
24642466
"AuditLogsTitle": "审计日志",

client/packages/lowcoder/src/pages/ApplicationV2/NewsLayout.tsx

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ export function NewsLayout() {
9898
.catch(err => console.error("Failed to load news:", err));
9999
}, []);
100100

101-
console.log(youTubeData);
102-
103101
return (
104102
<Wrapper>
105103
<HeaderWrapper></HeaderWrapper>
@@ -110,6 +108,69 @@ export function NewsLayout() {
110108
<h1 style={{color: "#ffffff", marginTop : "12px"}}>Lowcoder {trans("home.news")}</h1>
111109
</StyleNewsCover>
112110
<Card style={{ marginBottom: "20px", minHeight : "800px" }}>
111+
112+
<SectionTitle level={2}>📝 Latest Blog Posts</SectionTitle>
113+
<Row gutter={[16, 16]}>
114+
{hubspotData?.map((item: { htmlTitle: any; publishDate: any; postSummary: any; url: any; featuredImage: any; metaDescription: any; }, idx: any) => {
115+
const {
116+
htmlTitle,
117+
publishDate,
118+
postSummary,
119+
url,
120+
featuredImage,
121+
metaDescription,
122+
} = item;
123+
124+
const summaryHtml = postSummary || metaDescription || "";
125+
const coverImage = featuredImage || "https://placehold.co/600x400?text=Lowcoder+Blog";
126+
127+
// Strip HTML to plain text
128+
const stripHtml = (html: string): string => {
129+
const div = document.createElement("div");
130+
div.innerHTML = html;
131+
return div.textContent || div.innerText || "";
132+
};
133+
134+
const plainSummary = stripHtml(summaryHtml);
135+
136+
return (
137+
<Col xs={24} sm={12} md={12} lg={8} key={`blog-${idx}`}>
138+
<Card
139+
hoverable
140+
cover={
141+
<a href={url} target="_blank" rel="noreferrer">
142+
<CardImage src={coverImage} alt={htmlTitle} />
143+
</a>
144+
}
145+
>
146+
<Card.Meta
147+
title={
148+
<a href={url} target="_blank" rel="noreferrer">
149+
{htmlTitle}
150+
</a>
151+
}
152+
description={
153+
<>
154+
<Paragraph type="secondary" style={{ marginBottom: 4 }}>
155+
{new Date(publishDate).toLocaleDateString()}
156+
</Paragraph>
157+
<Paragraph
158+
ellipsis={{ rows: 4 }}
159+
type="secondary"
160+
style={{ fontSize: "13px" }}
161+
>
162+
{plainSummary}
163+
</Paragraph>
164+
</>
165+
}
166+
/>
167+
</Card>
168+
</Col>
169+
);
170+
})}
171+
</Row>
172+
173+
<Divider />
113174

114175
<SectionTitle level={2}>📺 Latest YouTube Videos
115176
<Paragraph type="secondary" style={{ marginBottom: 0, marginTop: 4 }}>
@@ -173,17 +234,7 @@ export function NewsLayout() {
173234

174235
<Divider />
175236

176-
<SectionTitle level={2}>📝 Latest Blog Posts</SectionTitle>
177-
<Row gutter={[16, 16]}>
178-
{hubspotData.length === 0 && (
179-
<Col span={24}>
180-
<Paragraph>No blog posts available at the moment.</Paragraph>
181-
</Col>
182-
)}
183-
184-
</Row>
185237

186-
<Divider />
187238

188239
</Card>
189240

client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
NEWS_URL,
1212
ORG_HOME_URL,
1313
SUBSCRIPTION_SETTING,
14+
ENVIRONMENT_SETTING,
1415
} from "constants/routesURL";
1516
import { getUser, isFetchingUser } from "redux/selectors/usersSelectors";
1617
import { useDispatch, useSelector } from "react-redux";
@@ -231,6 +232,20 @@ export default function ApplicationHome() {
231232
}
232233
]
233234
},
235+
{
236+
items: [
237+
{
238+
text: <TabLabel>{trans("environments.detail_enterpriseEdition")}</TabLabel>,
239+
routePath: ENVIRONMENT_SETTING,
240+
routeComp: Setting,
241+
routePathExact: false,
242+
icon: ({ selected, ...otherProps }) => <EnterpriseIcon {...otherProps} width={"24px"} />,
243+
mobileVisible: true,
244+
visible: () => !isLicenseActive,
245+
style: { color: "#ff6f3c" },
246+
}
247+
]
248+
},
234249

235250
{
236251
items: [

client/packages/lowcoder/src/pages/setting/appUsage/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const AppUsageDoc = () => {
5555
const user = useSelector(getUser);
5656
const deploymentId = useSelector(getDeploymentId);
5757
const dispatch = useDispatch();
58+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
5859

5960
const apiUsage = useSelector(getOrgApiUsage);
6061
useEffect(() => {
@@ -122,12 +123,6 @@ const apiUsage = useSelector(getOrgApiUsage);
122123
</Card>
123124
</StyledSection>
124125

125-
<StyledSection>
126-
<Card title={trans("enterprise.yourDeploymentID")}>
127-
<Paragraph><h3>{deploymentId}</h3></Paragraph>
128-
</Card>
129-
</StyledSection>
130-
131126
<StyledSection>
132127
<Card title={trans("enterprise.PricingTitle")}>
133128
<Paragraph>{trans("enterprise.PricingIntro")}</Paragraph>

client/packages/lowcoder/src/pages/setting/audit/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ const Audit = () => {
5454
const user = useSelector(getUser);
5555
const deploymentId = useSelector(getDeploymentId);
5656
const dispatch = useDispatch();
57-
57+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
58+
5859
const apiUsage = useSelector(getOrgApiUsage);
5960
useEffect(() => {
6061
dispatch(fetchAPIUsageAction(user.currentOrgId));
@@ -162,12 +163,6 @@ const Audit = () => {
162163
</Card>
163164
</StyledSection>
164165

165-
<StyledSection>
166-
<Card title={trans("enterprise.yourDeploymentID")}>
167-
<Paragraph><h3>{deploymentId}</h3></Paragraph>
168-
</Card>
169-
</StyledSection>
170-
171166
<StyledSection>
172167
<Card title={trans("enterprise.PricingTitle")}>
173168
<Paragraph>{trans("enterprise.PricingIntro")}</Paragraph>

client/packages/lowcoder/src/pages/setting/branding/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const BrandingPromo = () => {
4545
const user = useSelector(getUser);
4646
const deploymentId = useSelector(getDeploymentId);
4747
const dispatch = useDispatch();
48+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
4849

4950
const apiUsage = useSelector(getOrgApiUsage);
5051
useEffect(() => {
@@ -152,12 +153,6 @@ const BrandingPromo = () => {
152153
<Paragraph>{trans("enterprise.BrandingWhatsNewIntro")}</Paragraph>
153154
</Card>
154155
</StyledSection>
155-
156-
<StyledSection>
157-
<Card title={trans("enterprise.yourDeploymentID")}>
158-
<Paragraph><h3>{deploymentId}</h3></Paragraph>
159-
</Card>
160-
</StyledSection>
161156

162157
<StyledSection>
163158
<Card title={trans("enterprise.PricingTitle")}>

client/packages/lowcoder/src/pages/setting/environments/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const EnvironmentsPromo = () => {
4444
const [modalOpen, setModalOpen] = useState(false);
4545
const user = useSelector(getUser);
4646
const deploymentId = useSelector(getDeploymentId);
47+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
4748

4849
const dispatch = useDispatch();
4950

@@ -129,11 +130,11 @@ const EnvironmentsPromo = () => {
129130
</Card>
130131
</StyledSection>
131132

132-
<StyledSection>
133+
{!isLowCoderDomain && <StyledSection>
133134
<Card title={trans("enterprise.yourDeploymentID")}>
134135
<Paragraph><h3>{deploymentId}</h3></Paragraph>
135136
</Card>
136-
</StyledSection>
137+
</StyledSection> }
137138

138139
<StyledSection>
139140
<Card title={trans("enterprise.PricingTitle")}>

client/packages/lowcoder/src/pages/setting/hubspotModal.tsx

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ interface Props {
4141
}
4242

4343
export function HubspotModal({ open, onClose, orgId, deploymentIds }: Props) {
44+
45+
const isLowCoderDomain = typeof window !== "undefined" && window.location.hostname === "app.lowcoder.cloud";
46+
4447
useEffect(() => {
4548
if (!open) return;
4649

@@ -96,21 +99,25 @@ export function HubspotModal({ open, onClose, orgId, deploymentIds }: Props) {
9699
</Paragraph>
97100
<Paragraph copyable>{orgId}</Paragraph>
98101

99-
<Paragraph strong>
100-
<Text>Deployment IDs:</Text>
101-
</Paragraph>
102+
103+
{ !isLowCoderDomain &&
104+
<>
105+
<Paragraph strong>
106+
<Text>Deployment IDs:</Text>
107+
</Paragraph>
108+
<Space direction="vertical" style={{ width: "100%" }}>
109+
{deploymentIds.length === 0 ? (
110+
<Text type="secondary">No deployments found.</Text>
111+
) : (
112+
deploymentIds.map((id, idx) => (
113+
<Paragraph key={idx} copyable style={{ marginBottom: 4 }}>
114+
{id}
115+
</Paragraph>
116+
))
117+
)}
118+
</Space></>
119+
}
102120

103-
<Space direction="vertical" style={{ width: "100%" }}>
104-
{deploymentIds.length === 0 ? (
105-
<Text type="secondary">No deployments found.</Text>
106-
) : (
107-
deploymentIds.map((id, idx) => (
108-
<Paragraph key={idx} copyable style={{ marginBottom: 4 }}>
109-
{id}
110-
</Paragraph>
111-
))
112-
)}
113-
</Space>
114121
</Typography>
115122
</Card>
116123

client/packages/lowcoder/src/pages/setting/settingHome.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,31 @@ export function SettingHome() {
165165
<div style={{ marginBottom: 12 }}>
166166
{trans("enterprise.premiumFeaturesNotice")}
167167
</div>
168-
<Button type="primary" onClick={() => setHubspotVisible(true)}>
168+
<Button
169+
type="primary"
170+
style={{ backgroundColor: "#ff6f3c", borderColor: "#ff6f3c" }}
171+
onClick={() => setHubspotVisible(true)}
172+
>
169173
{trans("enterprise.requestLicensesBtton")}
170174
</Button>
175+
176+
<div style={{ margin: "12px 0" }}>
177+
{trans("enterprise.readMoreNotice")}
178+
</div>
179+
180+
<Button
181+
type="default"
182+
onClick={() =>
183+
window.open(
184+
"https://docs.lowcoder.cloud/lowcoder-documentation/setup-and-run/lowcoder-enterprise-edition",
185+
"_blank",
186+
"noopener"
187+
)
188+
}
189+
>
190+
{trans("enterprise.readMoreButton")}
191+
</Button>
192+
171193
</Card>
172194
)}
173195
</SubSideBar>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy