Skip to content

Commit ed44c5c

Browse files
author
FalkWolsky
committed
Fixes in styles and Translations
1 parent b85f013 commit ed44c5c

File tree

8 files changed

+65
-38
lines changed

8 files changed

+65
-38
lines changed

client/packages/lowcoder-design/src/components/Section.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export const sectionNames = {
177177
meetings: trans("prop.meetings"), // added by Falk Wolsky
178178
field: trans("prop.field"),
179179
inputFieldStyle:trans("prop.inputFieldStyle"),
180+
childrenInputFieldStyle:trans("prop.childrenInputFieldStyle"),
180181
avatarStyle:trans("prop.avatarStyle"),
181182
captionStyle:trans("prop.captionStyle"),
182183
startButtonStyle:trans("prop.startButtonStyle"),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const en = {
3030
data: "Data",
3131
field: 'Field',
3232
inputFieldStyle: 'Input Field Style',
33+
childrenInputFieldStyle: 'Children Input Field Style',
3334
avatarStyle: 'Avatar Style',
3435
captionStyle: 'Caption Style',
3536
startButtonStyle: 'Start Button Style',

client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const LeftButtonWrapper = styled.div<{ $buttonStyle: DropdownStyleType }>`
3838
${(props) => `margin: ${props.$buttonStyle.margin};`}
3939
margin-right: 0;
4040
.ant-btn span {
41-
${(props) => `text-decoration: ${props.$buttonStyle.textDecoration};`}
42-
${(props) => `font-family: ${props.$buttonStyle.fontFamily};`}
41+
${(props) => props.$buttonStyle.textDecoration !== undefined ? `text-decoration: ${props.$buttonStyle.textDecoration};` : ''}
42+
${(props) => props.$buttonStyle.fontFamily !== undefined ? `font-family: ${props.$buttonStyle.fontFamily};` : ''}
4343
}
4444
4545
.ant-btn {
@@ -48,6 +48,7 @@ const LeftButtonWrapper = styled.div<{ $buttonStyle: DropdownStyleType }>`
4848
height: 100%;
4949
&.ant-btn-default {
5050
margin: 0 !important;
51+
5152
${(props) => `border-radius: ${props.$buttonStyle.radius} 0 0 ${props.$buttonStyle.radius};`}
5253
${(props) => `text-transform: ${props.$buttonStyle.textTransform};`}
5354
${(props) => `font-weight: ${props.$buttonStyle.textWeight};`}

client/packages/lowcoder/src/comps/comps/dividerComp.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { default as Divider, DividerProps } from "antd/es/divider";
22
import { StringControl } from "comps/controls/codeControl";
33
import { BoolControl } from "comps/controls/boolControl";
44
import { alignControl } from "comps/controls/alignControl";
5-
import { UICompBuilder } from "comps/generators";
5+
import { UICompBuilder, withDefault } from "comps/generators";
66
import { NameConfig, NameConfigHidden } from "comps/generators/withExposing";
77
import { Section, sectionNames } from "lowcoder-design";
88
import _ from "lodash";
@@ -12,6 +12,8 @@ import { AnimationStyle, AnimationStyleType, DividerStyle, DividerStyleType, hei
1212
import { migrateOldData } from "comps/generators/simpleGenerators";
1313
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1414
import { trans } from "i18n";
15+
import { AutoHeightControl } from "comps/controls/autoHeightControl";
16+
1517

1618
import { useContext } from "react";
1719
import { EditorContext } from "comps/editorState";
@@ -22,7 +24,6 @@ type IProps = DividerProps & {
2224
$animationStyle:AnimationStyleType;
2325
};
2426

25-
// TODO: find out how to set border style when text is active
2627
// TODO: enable type "vertical" https://ant.design/components/divider
2728

2829
const StyledDivider = styled(Divider) <IProps>`
@@ -40,7 +41,7 @@ const StyledDivider = styled(Divider) <IProps>`
4041
font-style:${(props) => props.$style.fontStyle}
4142
}
4243
${props=>props.$animationStyle}
43-
min-width: 0;
44+
min-width: 1px;
4445
width: ${(props) => {
4546
return widthCalculator(props.$style.margin);
4647
}};
@@ -57,6 +58,7 @@ const StyledDivider = styled(Divider) <IProps>`
5758
border-block-start: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => (props.dashed ? "dashed" : "solid")} ${(props) => props.$style.border} !important;
5859
border-block-start-color: inherit;
5960
border-block-end: 0;
61+
border-block-start-radius: inherit;
6062
}
6163
6264
&.ant-divider-horizontal.ant-divider-with-text {
@@ -76,6 +78,7 @@ const childrenMap = {
7678
title: StringControl,
7779
dashed: BoolControl,
7880
align: alignControl(),
81+
autoHeight: withDefault(AutoHeightControl, "fixed"),
7982
style: styleControl(DividerStyle),
8083
animationStyle: styleControl(AnimationStyle),
8184
};
@@ -96,7 +99,7 @@ function fixOldStyleData(oldData: any) {
9699

97100

98101
// Compatible with historical style data 2022-8-26
99-
export const DividerComp = migrateOldData(
102+
const DividerTempComp = migrateOldData(
100103
new UICompBuilder(childrenMap, (props) => {
101104
return (
102105
<StyledDivider
@@ -130,6 +133,7 @@ export const DividerComp = migrateOldData(
130133
label: trans("divider.align"),
131134
radioButton: true,
132135
})}
136+
{children.autoHeight.getPropertyView()}
133137
</Section>
134138
<Section name={sectionNames.style}>
135139
{children.dashed.propertyView({ label: trans("divider.dashed") })}
@@ -152,3 +156,9 @@ export const DividerComp = migrateOldData(
152156
.build(),
153157
fixOldStyleData
154158
);
159+
160+
export const DividerComp = class extends DividerTempComp {
161+
override autoHeight(): boolean {
162+
return this.children.autoHeight.getView();
163+
}
164+
};

client/packages/lowcoder/src/comps/comps/selectInputComp/cascaderContants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const CascaderPropertyView = (
8585
<Section name={sectionNames.inputFieldStyle}>
8686
{children.inputFieldStyle.getPropertyView()}
8787
</Section>
88-
<Section name={'Children Input Field Style'}>
88+
<Section name={sectionNames.childrenInputFieldStyle}>
8989
{children.childrenInputFieldStyle.getPropertyView()}
9090
</Section>
9191
<Section name={sectionNames.animationStyle} hasTooltip={true}>

client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export const SelectPropertyView = (
363363
<Section name={sectionNames.inputFieldStyle}>
364364
{children.inputFieldStyle.getPropertyView()}
365365
</Section>
366-
<Section name={'Children Input Field Styles'}>
366+
<Section name={sectionNames.childrenInputFieldStyle}>
367367
{children.childrenInputFieldStyle.getPropertyView()}
368368
</Section>
369369
</>

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

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ export const en = {
217217
"className": "CSS Class name",
218218
"dataTestId": "Individual ID",
219219
"preventOverwriting": "Prevent overwriting styles",
220+
"color": "Color",
220221
},
221222
"autoHeightProp": {
222223
"auto": "Auto",
@@ -471,10 +472,10 @@ export const en = {
471472
"borderRadius": "Border Radius",
472473
"borderWidth": "Border Width",
473474
"borderStyle":"Border Style",
474-
"background": "Background",
475-
"headerBackground": "Header Background",
476-
"siderBackground": "Sider Background",
477-
"footerBackground": "Footer Background",
475+
"background": "Background Color",
476+
"headerBackground": "Header Background Color",
477+
"siderBackground": "Sider Background Color",
478+
"footerBackground": "Footer Background Color",
478479
"fill": "Fill",
479480
"track": "Track",
480481
"links": "Links",
@@ -488,20 +489,20 @@ export const en = {
488489
"multiIcon": "Multiselect Icon",
489490
"tabText": "Tab Text",
490491
"tabAccent": "Tab Accent",
491-
"checkedBackground": "Checked Background",
492-
"uncheckedBackground": "Unchecked Background",
493-
"uncheckedBorder": "Unchecked Border",
494-
"indicatorBackground": "Indicator Background",
492+
"checkedBackground": "Checked Background Color",
493+
"uncheckedBackground": "Unchecked Background Color",
494+
"uncheckedBorder": "Unchecked Border Color",
495+
"indicatorBackground": "Indicator Background Color",
495496
"tableCellText": "Cell Text",
496-
"selectedRowBackground": "Selected Row Background",
497-
"hoverRowBackground": "Hover Row Background",
498-
"hoverBackground":"Hover Background",
497+
"selectedRowBackground": "Selected Row Background Color",
498+
"hoverRowBackground": "Hover Row Background Color",
499+
"hoverBackground":"Hover Background Color",
499500
"textTransform":"Text Transform",
500501
"textDecoration":"Text Decoration",
501-
"alternateRowBackground": "Alternate Row Background",
502-
"tableHeaderBackground": "Header Background",
502+
"alternateRowBackground": "Alternate Row Background Color",
503+
"tableHeaderBackground": "Header Background Color",
503504
"tableHeaderText": "Header Text",
504-
"toolbarBackground": "Toolbar Background",
505+
"toolbarBackground": "Toolbar Background Color",
505506
"toolbarText": "Toolbar Text",
506507
"pen": "Pen",
507508
"footerIcon": "Footer Icon",
@@ -523,22 +524,36 @@ export const en = {
523524
"textWeight": "Text Weight",
524525
"fontFamily": "Font Family",
525526
"fontStyle":"Font Style",
526-
"backgroundImage": "BG Image",
527-
"backgroundImageRepeat": "BG Repeat",
528-
"backgroundImageSize": "BG Size",
529-
"backgroundImagePosition": "BG Position",
530-
"backgroundImageOrigin": "BG Origin",
531-
"headerBackgroundImage": "BgImage",
532-
"headerBackgroundImageRepeat": "BgImage Repeat",
533-
"headerBackgroundImageSize": "BgImage Size",
534-
"headerBackgroundImagePosition": "BgImage Position",
535-
"headerBackgroundImageOrigin": "BgImage Origin",
536-
"footerBackgroundImage": "BgImage",
537-
"footerBackgroundImageRepeat": "BgImage Repeat",
538-
"footerBackgroundImageSize": "BgImage Size",
539-
"footerBackgroundImagePosition": "BgImage Position",
540-
"footerBackgroundImageOrigin": "BgImage Origin",
527+
"backgroundImage": "Background Image",
528+
"backgroundImageRepeat": "Background Repeat",
529+
"backgroundImageSize": "Background Size",
530+
"backgroundImagePosition": "Background Position",
531+
"backgroundImageOrigin": "Background Origin",
532+
"headerBackgroundImage": "Background Image",
533+
"headerBackgroundImageRepeat": "Background Image Repeat",
534+
"headerBackgroundImageSize": "Background Image Size",
535+
"headerBackgroundImagePosition": "Background Image Position",
536+
"headerBackgroundImageOrigin": "Background Image Origin",
537+
"footerBackgroundImage": "Background Image",
538+
"footerBackgroundImageRepeat": "Background Image Repeat",
539+
"footerBackgroundImageSize": "Background Image Size",
540+
"footerBackgroundImagePosition": "Background Image Position",
541+
"footerBackgroundImageOrigin": "Background Image Origin",
541542
"rotation": "Rotation",
543+
"alternateBackground": "Alternate Background Color",
544+
"headerText": "Header Text Color",
545+
"labelColor": "Label Color",
546+
"label": "Label Color",
547+
"subTitleColor": "SubTitle Color",
548+
"titleText": "Title Color",
549+
"success": "Success Color",
550+
"siderBackgroundImage": "Sider Background Image",
551+
"siderBackgroundImageRepeat": "Sider Background Image Repeat",
552+
"siderBackgroundImageSize": "Sider Background Image Size",
553+
"siderBackgroundImagePosition": "Sider Background Image Position",
554+
"siderBackgroundImageOrigin": "Sider Background Image Origin",
555+
"activeBackground": "Active Background Color",
556+
542557
},
543558
"export": {
544559
"hiddenDesc": "If true, the component is hidden",

client/packages/lowcoder/src/pages/ApplicationV2/components/stoplight.styles.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)