Skip to content

Commit fe41be8

Browse files
committed
Merge branch 'dev' into actions_js_console
2 parents 2103cfe + bf68435 commit fe41be8

File tree

15 files changed

+1114
-31
lines changed

15 files changed

+1114
-31
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const SelectWrapper = styled.div<{ $border?: boolean }>`
2020
padding: ${(props) => (props.$border ? "0px" : "0 0 0 12px")};
2121
height: 100%;
2222
align-items: center;
23-
margin-right: 8px;
23+
margin-right: 10px;
24+
padding-right: 5px;
2425
background-color: #fff;
2526
2627
.ant-select-selection-item {
@@ -46,9 +47,9 @@ const SelectWrapper = styled.div<{ $border?: boolean }>`
4647
}
4748
4849
.ant-select-arrow {
49-
width: 20px;
50-
height: 20px;
51-
right: 8px;
50+
width: 17px;
51+
height: 17px;
52+
right: 10px;
5253
top: 0;
5354
bottom: 0;
5455
margin: auto;

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ export type GetCurrentUserResponse = GenericApiResponse<CurrentUser>;
6363
export interface GetMyOrgsResponse extends ApiResponse {
6464
data: {
6565
data: Array<{
66-
orgId: string;
67-
orgName: string;
68-
createdAt?: number;
69-
updatedAt?: number;
66+
isCurrentOrg: boolean;
67+
orgView: {
68+
orgId: string;
69+
orgName: string;
70+
createdAt?: number;
71+
updatedAt?: number;
72+
};
7073
}>;
7174
pageNum: number;
7275
pageSize: number;

client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function PermissionTagRender(props: CustomTagProps) {
274274
color={value}
275275
closable={closable}
276276
onClose={onClose}
277-
style={{ marginRight: 3 }}
277+
style={{ marginRight: 3, display: "flex", alignItems: "center" }}
278278
>
279279
{label}
280280
</StyledTag>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ export const SelectInputValidationSection = (children: ValidationComp) => (
128128
label: trans("prop.showEmptyValidation"),
129129
})}
130130
{children.allowCustomTags.propertyView({
131-
label: trans("prop.customTags")
131+
label: trans("prop.customTags"),
132+
tooltip: trans("prop.customTagsTooltip")
132133
})}
133134
{children.customRule.propertyView({})}
134135
</Section>

client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,10 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
179179
const inputValue = { ...props.value }.value;
180180

181181
useEffect(() => {
182+
setLocalInputValue(defaultValue);
182183
props.value.onChange(defaultValue)
183184
}, [defaultValue]);
184185

185-
useEffect(() => {
186-
if (inputValue !== localInputValue) {
187-
setLocalInputValue(inputValue);
188-
}
189-
}, [inputValue]);
190-
191186
useEffect(() => {
192187
if (!changeRef.current) return;
193188

@@ -220,8 +215,7 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
220215
propsRef.current.value.onChange(value);
221216
propsRef.current.onEvent("change");
222217
}, 1000)
223-
);
224-
218+
);
225219

226220
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
227221
const value = e.target.value;

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,42 @@ let TimerCompBasic = (function () {
299299
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('reset'))
300300
},
301301
},
302+
{
303+
method: {
304+
name: "start",
305+
description: trans("timer.start"),
306+
params: [],
307+
},
308+
execute: async (comp, params) => {
309+
if (comp.children.timerState.value === 'stoped') {
310+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('start'))
311+
}
312+
},
313+
},
314+
{
315+
method: {
316+
name: "pause",
317+
description: trans("timer.pause"),
318+
params: [],
319+
},
320+
execute: async (comp, params) => {
321+
if (comp.children.timerState.value === 'started') {
322+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('pause'))
323+
}
324+
},
325+
},
326+
{
327+
method: {
328+
name: "resume",
329+
description: trans("timer.resume"),
330+
params: [],
331+
},
332+
execute: async (comp, params) => {
333+
if (comp.children.timerState.value === 'paused') {
334+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('resume'))
335+
}
336+
}
337+
}
302338
])
303339
.build();
304340
})();

client/packages/lowcoder/src/constants/orgConstants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type Org = {
5656
createTime?: string;
5757
createdAt?: number;
5858
updatedAt?: number;
59+
isCurrentOrg?: boolean;
5960
};
6061

6162
export type OrgAndRole = {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ export const en = {
235235
"verticalGridCells": "Vertical Grid Cells",
236236
"timeZone": "TimeZone",
237237
"pickerMode": "Picker Mode",
238-
"customTags": "Custom Tags"
238+
"customTags": "Allow Custom Tags",
239+
"customTagsTooltip": "Allow users to enter custom tags that are not in the options list."
239240
},
240241
"autoHeightProp": {
241242
"auto": "Auto",

client/packages/lowcoder/src/pages/common/WorkspaceSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ export default function WorkspaceSectionComponent({
242242
displayWorkspaces.map((org: Org) => (
243243
<WorkspaceItem
244244
key={org.id}
245-
$isActive={user.currentOrgId === org.id}
245+
$isActive={org.isCurrentOrg}
246246
onClick={() => handleOrgSwitch(org.id)}
247247
>
248248
<WorkspaceName title={org.name}>{org.name}</WorkspaceName>
249-
{user.currentOrgId === org.id && <ActiveIcon />}
249+
{org.isCurrentOrg && <ActiveIcon />}
250250
</WorkspaceItem>
251251
))
252252
) : (

client/packages/lowcoder/src/pages/setting/organization/orgList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ function OrganizationSetting() {
211211
logoUrl: org.logoUrl || "",
212212
createdAt: org.createdAt,
213213
updatedAt: org.updatedAt,
214+
isCurrentOrg: org.isCurrentOrg,
214215
}));
215216

216217

@@ -262,7 +263,7 @@ function OrganizationSetting() {
262263
dataIndex: "orgName",
263264
ellipsis: true,
264265
render: (_, record: any) => {
265-
const isActiveOrg = record.id === user.currentOrgId;
266+
const isActiveOrg = record.isCurrentOrg;
266267
return (
267268
<OrgName>
268269
<StyledOrgLogo source={record.logoUrl} orgName={record.orgName} />
@@ -307,7 +308,7 @@ function OrganizationSetting() {
307308
key: i,
308309
operation: (
309310
<OperationWrapper>
310-
{item.id !== user.currentOrgId && (
311+
{!item.isCurrentOrg && (
311312
<SwitchBtn
312313
className={"home-datasource-edit-button"}
313314
buttonType={"blue"}

0 commit comments

Comments
 (0)