Skip to content

Commit 247106e

Browse files
author
FalkWolsky
committed
Small layout fixes at Theme Comp Display
1 parent d0eceb5 commit 247106e

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,8 +2539,8 @@ export const en = {
25392539
"fontFamily": "Font Family",
25402540
"fontFamilyDesc": "Default font family used by most components",
25412541
"chart": "Chart Style",
2542-
"chartDesc": "Input for Echarts",
2543-
"echartsJson": "Theme JSON",
2542+
"chartDesc": "Here you can place eCharts Theme JSON to define the style of your charts in all Details.",
2543+
"echartsJson": "You can use here the Theme JSON Generator. Copy the JSON from the Generator and paste it here.",
25442544
"margin": "Margin",
25452545
"marginDesc": "Default margin typically used for most components",
25462546
"padding": "Padding",

client/packages/lowcoder/src/pages/setting/theme/ThemeCompPanel.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export const ThemeCompPanel = (props: any) => {
313313
return (
314314
<PreviewApp
315315
style={{
316-
height: "680px",
316+
height: "650px",
317317
minWidth: "auto",
318318
width: "100%",
319319
}}
@@ -346,8 +346,8 @@ export const ThemeCompPanel = (props: any) => {
346346
style={{ marginBottom: 16 }}
347347
/>
348348
</List.Item>
349-
<List.Item>
350-
<div style={{overflow : "auto", height: "540px"}}>
349+
<List.Item style={{padding: "0 15px"}}>
350+
<div style={{overflow : "auto", width: "230px", height: "540px"}}>
351351
<PropertySectionContext.Provider
352352
value={propertySectionContextValue}
353353
>
@@ -357,14 +357,15 @@ export const ThemeCompPanel = (props: any) => {
357357
</List.Item>
358358
</List>
359359
<Divider type="vertical" style={{height: "630px"}}/>
360-
<div style={{flex: "1"}}>
360+
<div style={{flex: "1", height: "600px", borderRadius: "8px"}}>
361361
{appPreview}
362362
</div>
363363
<Divider type="vertical" style={{height: "630px"}}/>
364364
<div style={{
365365
width: "280px",
366366
padding: "12px",
367367
overflow: "auto",
368+
height: "630px",
368369
}}>
369370
{stylePropertyView}
370371
</div>

client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,13 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
412412
fontFamily={layoutSettingsItem.value}
413413
configChange={(params) => {
414414
this.configChange(params);
415-
}}
416-
/>
415+
}}/>
417416
}
418-
</List.Item>
417+
</List.Item>
418+
<List.Item>
419+
<div style={{ width: "200px", color: "#aaa"}}>Currently, the preview of Font-Family here in the Theme Settings may now show the right font. However, the Font Family Attribute comes into effect in all your apps, which uses this Theme.
420+
<br/><br/><a href="https://docs.lowcoder.cloud/lowcoder-documentation/build-applications/themes-and-styling#demo-2-custom-font-family" target="_blank">Remember, you neded to set the CSS inclue at App- or Workspace Level</a></div>
421+
</List.Item>
419422
</Tooltip>
420423
))}
421424
</>
@@ -522,7 +525,7 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
522525
<StyleThemeSettingsCover>
523526
<ShapesCompIcon width={"36px"} style={{marginRight : "10px"}}/> <h2 style={{color: "#ffffff", marginTop : "8px"}}> {trans("theme.components")}</h2>
524527
</StyleThemeSettingsCover>
525-
<Card style={{ marginBottom: "20px", minHeight : "200px" }}
528+
<Card style={{ marginBottom: "20px", minHeight : "200px", height: "690px", overflow: "hidden"}}
526529
>
527530
<ThemeCompPanel
528531
theme={this.state.theme}
@@ -553,28 +556,33 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
553556
<ChartCompIcon width={"36px"} style={{marginRight : "10px"}}/> <h2 style={{color: "#ffffff", marginTop : "8px"}}> {trans("theme.charts")}</h2>
554557
</StyleThemeSettingsCover>
555558
<Card style={{ marginBottom: "20px", minHeight : "200px" }}>
556-
<ChartDesc>
557-
{trans("themeDetail.chartDesc")}
558-
<a target="_blank" href="https://echarts.apache.org/en/theme-builder.html" rel="noreferrer">
559-
{" "}
560-
{trans("themeDetail.echartsJson")}
561-
</a>
562-
</ChartDesc>
563559
<Flex gap={"middle"}>
564560
<ChartInput>
565-
<div className="code-editor" style={{height: "380px", width:"100%", minWidth:"300px"}}>
561+
<List
562+
bordered>
563+
<List.Item>
564+
<div style={{width: "210px"}}>
565+
{trans("themeDetail.chartDesc")}
566+
<a target="_blank" href="https://echarts.apache.org/en/theme-builder.html" rel="noreferrer">
567+
{" "}
568+
{trans("themeDetail.echartsJson")}
569+
</a>
570+
</div>
571+
</List.Item>
572+
<List.Item style={{width : "260px", height: "370px", padding:"10px"}}>
566573
<CodeEditor
567574
value={this.state.theme.chart || ""}
568575
onChange={(value) => this.configChange({
569576
themeSettingKey: "chart",
570577
chart: value.doc.toString() ? value.doc.toString() : undefined,
571578
})}
572579
styleName="window"
573-
codeType="Function"
574-
showLineNum
580+
codeType="PureJSON"
581+
showLineNum={false}
575582
bordered
576583
/>
577-
</div>
584+
</List.Item>
585+
</List>
578586
</ChartInput>
579587
<Divider type="vertical" style={{height: "370px"}}/>
580588
<PreviewApp style={{ height: "380px", width: "100%", margin: "0" }} theme={this.state.theme} dsl={chartDsl} />

0 commit comments

Comments
 (0)