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

0 commit comments

Comments
 (0)