Skip to content

Commit 6035af5

Browse files
committed
Merge branch 'dev' of github.com:lowcoder-org/lowcoder into feat/1109-nav-tree-items
2 parents 9af73e5 + 482c30c commit 6035af5

File tree

38 files changed

+12227
-634
lines changed

38 files changed

+12227
-634
lines changed

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"@types/styled-components": "^5.1.34",
8282
"antd-mobile": "^5.34.0",
8383
"chalk": "4",
84+
"dompurify": "^3.3.1",
8485
"flag-icons": "^7.2.1",
8586
"number-precision": "^1.6.0",
8687
"react-countup": "^6.5.3",

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

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,24 @@ const SwitchStyle: any = styled.input`
5252
border-radius: 20px;
5353
background-color: #ffffff;
5454
}
55+
56+
&:disabled {
57+
background-color: #e0e0e0;
58+
opacity: 0.6;
59+
cursor: not-allowed;
60+
}
61+
62+
&:disabled::before {
63+
background-color: #cccccc;
64+
}
65+
66+
&:disabled:checked {
67+
background-color: #a0a0a0;
68+
}
69+
70+
&:disabled:hover {
71+
cursor: not-allowed;
72+
}
5573
`;
5674

5775
const SwitchDiv = styled.div<{
@@ -104,16 +122,18 @@ const JsIconGray = styled(jsIconGray)<Ishow>`
104122
interface SwitchProps extends Omit<React.HTMLAttributes<HTMLInputElement>, "value" | "onChange"> {
105123
value: boolean;
106124
onChange: (value: boolean) => void;
125+
disabled?: boolean;
107126
}
108127

109128
export const Switch = (props: SwitchProps) => {
110-
const { value, onChange, ...inputChanges } = props;
129+
const { value, onChange, disabled, ...inputChanges } = props;
111130
return (
112131
<SwitchStyle
113132
type="checkbox"
114-
checked={props.value}
115-
onClick={() => props.onChange(!props.value)}
133+
checked={value}
134+
onClick={() => onChange(!value)}
116135
onChange={() => {}}
136+
disabled={disabled}
117137
{...inputChanges}
118138
/>
119139
);
@@ -154,15 +174,17 @@ export const SwitchWrapper = (props: {
154174
export function TacoSwitch(props: {
155175
label: string;
156176
checked: boolean;
157-
onChange: (checked: boolean) => void;
177+
disabled?: boolean;
178+
onChange?: (checked: boolean) => void;
158179
}) {
159180
return (
160181
<SwitchWrapper label={props.label}>
161182
<Switch
162183
onChange={(value) => {
163-
props.onChange(value);
184+
props.onChange ? props.onChange(value) : null;
164185
}}
165186
value={props.checked}
187+
disabled={props.disabled}
166188
/>
167189
</SwitchWrapper>
168190
);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export const TutorialsTooltip = ({
210210
step,
211211
backProps,
212212
skipProps,
213+
closeProps,
213214
primaryProps,
214215
tooltipProps,
215216
isLastStep,
@@ -219,7 +220,7 @@ export const TutorialsTooltip = ({
219220
<ToolTipDiv {...tooltipProps} style={{ width: step.styles?.options?.width }}>
220221
<TooltipHeader>
221222
{step.title && <Title>{step.title}</Title>}
222-
<CloseDiv {...skipProps}>
223+
<CloseDiv {...closeProps}>
223224
<CloseIcon />
224225
</CloseDiv>
225226
</TooltipHeader>

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ export interface ApplicationResp extends ApiResponse {
7070
data: ApplicationDetail;
7171
}
7272

73+
export interface ApplicationPublishRequest {
74+
commitMessage?: string;
75+
tag: string;
76+
}
77+
7378
interface GrantAppPermissionReq {
7479
applicationId: string;
7580
role: ApplicationRoleType;
@@ -171,8 +176,13 @@ class ApplicationApi extends Api {
171176
return Api.put(ApplicationApi.updateApplicationURL(applicationId), rest);
172177
}
173178

174-
static publishApplication(request: PublishApplicationPayload): AxiosPromise<ApiResponse> {
175-
return Api.post(ApplicationApi.publishApplicationURL(request.applicationId));
179+
static publishApplication(
180+
request: PublishApplicationPayload
181+
): AxiosPromise<ApiResponse> {
182+
return Api.post(
183+
ApplicationApi.publishApplicationURL(request.applicationId),
184+
request?.request
185+
);
176186
}
177187

178188
static getApplicationDetail(request: FetchAppInfoPayload): AxiosPromise<ApplicationResp> {

0 commit comments

Comments
 (0)