Skip to content

Commit bbf21e9

Browse files
author
FalkWolsky
committed
Fixes in translations for OAuth Provider
1 parent ed44c5c commit bbf21e9

File tree

4 files changed

+57
-35
lines changed

4 files changed

+57
-35
lines changed

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

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,38 @@ type IProps = DividerProps & {
2626

2727
// TODO: enable type "vertical" https://ant.design/components/divider
2828

29-
const StyledDivider = styled(Divider) <IProps>`
29+
const StyledDivider = styled(Divider)<IProps>`
3030
margin-top: 3.5px;
31-
rotate:${props=>props.$style.rotation};
31+
rotate: ${(props) => props.$style.rotation};
32+
3233
.ant-divider-inner-text {
3334
height: 32px;
3435
display: flex;
3536
align-items: center;
3637
font-size: ${(props) => props.$style.textSize};
3738
font-weight: ${(props) => props.$style.textWeight};
3839
font-family: ${(props) => props.$style.fontFamily};
39-
text-transform:${(props)=>props.$style.textTransform};
40-
text-decoration:${(props)=>props.$style.textDecoration};
41-
font-style:${(props) => props.$style.fontStyle}
40+
text-transform: ${(props) => props.$style.textTransform};
41+
${(props) => props.$style.textDecoration !== undefined ? `text-decoration: ${props.$style.textDecoration};` : ''}
42+
font-style: ${(props) => props.$style.fontStyle};
4243
}
43-
${props=>props.$animationStyle}
44+
45+
${(props) => props.$animationStyle}
4446
min-width: 1px;
45-
width: ${(props) => {
46-
return widthCalculator(props.$style.margin);
47-
}};
48-
min-height: ${(props) => {
49-
return heightCalculator(props.$style.margin);
50-
}};
51-
margin: ${(props) => {
52-
return props.$style.margin;
53-
}};
47+
width: ${(props) => widthCalculator(props.$style.margin)};
48+
min-height: ${(props) => heightCalculator(props.$style.margin)};
49+
margin: ${(props) => props.$style.margin};
5450
padding: ${(props) => props.$style.padding};
55-
border-radius:${props=>props.$style.radius};
56-
border-top: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => props.$style.borderStyle} ${(props) => props.$style.border};
57-
.ant-divider-inner-text::before, .ant-divider-inner-text::after {
58-
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;
51+
border-radius: ${(props) => props.$style.radius};
52+
border-top: ${(props) => props.$style.borderWidth && props.$style.borderWidth !== "0px" ? props.$style.borderWidth : "1px"}
53+
${(props) => props.$style.borderStyle}
54+
${(props) => props.$style.border};
55+
56+
.ant-divider-inner-text::before,
57+
.ant-divider-inner-text::after {
58+
border-block-start: ${(props) => props.$style.borderWidth && props.$style.borderWidth !== "0px" ? props.$style.borderWidth : "1px"}
59+
${(props) => props.dashed ? "dashed" : "solid"}
60+
${(props) => props.$style.border} !important;
5961
border-block-start-color: inherit;
6062
border-block-end: 0;
6163
border-block-start-radius: inherit;
@@ -66,11 +68,14 @@ const StyledDivider = styled(Divider) <IProps>`
6668
border-top-color: ${(props) => props.$style.color};
6769
color: ${(props) => props.$style.text};
6870
}
71+
6972
&.ant-divider-horizontal.ant-divider-with-text::before,
70-
&.ant-divider-horizontal.ant-divider-with-text::after {
73+
&.ant-divider-horizontal.ant-divider-with-text::after {
7174
border-top-color: ${(props) => props.$style.color};
72-
border-radius:${props=>props.$style.radius};
73-
border-top: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => props.$style.borderStyle} ${(props) => props.$style.border};
75+
border-radius: ${(props) => props.$style.radius};
76+
border-top: ${(props) => props.$style.borderWidth && props.$style.borderWidth !== "0px" ? props.$style.borderWidth : "1px"}
77+
${(props) => props.$style.borderStyle}
78+
${(props) => props.$style.border};
7479
}
7580
`;
7681

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3368,7 +3368,23 @@ export const en = {
33683368
"manualTip": "",
33693369
"lockTip": "The Content is Locked. To Make Changes, Please Click the {icon} to Unlock.",
33703370
"lockModalContent": "Changing the 'ID Attribute' Field Can Have Significant Impacts on User Identification. Please Confirm That You Understand the Implications of This Change Before Proceeding.",
3371-
"payUserTag": "Premium"
3371+
"payUserTag": "Premium",
3372+
"source" : "Source",
3373+
"sourceName" : "Auth Provider Name",
3374+
"sourceDescription" : "Auth Provider Description",
3375+
"sourceIcon" : "Auth Provider Icon",
3376+
"sourceCategory" : "Auth Provider Category",
3377+
"souceIssuerURI" : "Auth Provider Issuer URI",
3378+
"souceAuthorizationEndpoint" : "Auth Provider Authorization Endpoint",
3379+
"souceTokenEndpoint" : "Auth Provider Token Endpoint",
3380+
"souceUserInfoEndpoint" : "Auth Provider User Info Endpoint",
3381+
"userInfoIntrospection" : "Use OpenID User Introspection",
3382+
"userCanSelectAccounts" : "User Can Select from Accounts",
3383+
"sourceCategoryEnterprise" : "Enterprise Identity",
3384+
"sourceCategoryCloud" : "Cloud Services",
3385+
"sourceCategorySocial" : "Social Media",
3386+
"sourceCategoryDevelopment" : "Development",
3387+
"sourceCategoryTools" : "Tools & Productivity",
33723388
},
33733389
"slotControl": {
33743390
"configSlotView": "Configure Slot View"

client/packages/lowcoder/src/pages/setting/idSource/OAuthForms/GenericOAuthForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface ConfigProvider {
6565
scope: string,
6666
sourceMappings: any,
6767
userInfoIntrospection?: boolean,
68+
userCanSelectAccounts?: boolean,
6869
}
6970

7071
type GenericOAuthFormProp = {

client/packages/lowcoder/src/pages/setting/idSource/idSourceConstants.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const AuthCategories = Object.keys(AuthCategoriesEnum).map(
3838
}
3939
);
4040

41+
const GenericProviderCategories = [{label: "Generic OAuth Provider", value: "GENERIC"}];
4142

4243
export const validatorOptions = [];
4344

@@ -88,21 +89,20 @@ export const authConfig = {
8889
sourceName: "Generic",
8990
sourceValue: AuthType.Generic,
9091
form: {
91-
source: { label: "Source", isRequire: true },
92-
sourceName: { label: "Source Name", isRequire: true },
93-
sourceDescription: { label: "Source Description", isRequire: false },
94-
sourceIcon: { label: "Source Icon", isIcon: true, isRequire: true, },
95-
sourceCategory: { label: "Source Category", isRequire: true, isList: true, options: AuthCategories },
92+
source: { label: trans("idSource.source"), isRequire: true, isList: true, options: GenericProviderCategories},
93+
sourceName: { label: trans("idSource.sourceName"), isRequire: true },
94+
sourceDescription: { label: trans("idSource.sourceDescription"), isRequire: false },
95+
sourceIcon: { label: trans("idSource.sourceIcon"), isIcon: true, isRequire: true, },
96+
sourceCategory: { label: trans("idSource.sourceCategory"), isRequire: true, isList: true, options: AuthCategories },
9697
...clientIdandSecretConfig,
97-
issuerUri: { label: 'Issuer URI', isRequire: true },
98-
authorizationEndpoint: { label: 'Authorization Endpoint', isRequire: true },
99-
tokenEndpoint: { label: 'Token Endpoint', isRequire: true },
100-
userInfoEndpoint: { label: 'UserInfo Endpoint', isRequire: true },
98+
issuerUri: { label: trans("idSource.souceIssuerURI"), isRequire: true },
99+
authorizationEndpoint: { label: trans("idSource.souceAuthorizationEndpoint"), isRequire: true },
100+
tokenEndpoint: { label: trans("idSource.souceTokenEndpoint"), isRequire: true },
101+
userInfoEndpoint: { label: trans("idSource.souceUserInfoEndpoint"), isRequire: true },
101102
// jwks: { label: 'Authorize URL', isRequire: true },
102103
scope: "Scope",
103-
userInfoIntrospection: { label: 'Use OpenID User Introspection', isSwitch: true, isRequire: false},
104-
// baseUrl: "Base URL",
105-
// realm: "Realm",
104+
userInfoIntrospection: { label: trans("idSource.userInfoIntrospection"), isSwitch: true, isRequire: false},
105+
userCanSelectAccounts: { label: trans("idSource.userCanSelectAccounts"), isSwitch: true, isRequire: false},
106106
},
107107
},
108108
} as { [key: string]: { sourceName: string; sourceValue: AuthType, form: FormItemType } };

0 commit comments

Comments
 (0)