Skip to content

Commit 95de3f4

Browse files
committed
change version to 1.1.1 & add help text
1 parent 71862ce commit 95de3f4

File tree

13 files changed

+93
-37
lines changed

13 files changed

+93
-37
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.1.1

client/packages/openblocks-comps/tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919
"baseUrl": "./src",
2020
"paths": {
2121
"@openblocks-ee/*": ["../../openblocks/src/*"],
22-
"*": [
23-
"*",
24-
"../../openblocks/src/*",
25-
"../../openblocks-sdk/src/*",
26-
"../../openblocks-design/src/*"
27-
]
22+
"openblocks-sdk": ["../../openblocks/src/index.sdk"],
23+
"*": ["*", "../../openblocks/src/*", "../../openblocks-design/src/*"]
2824
}
2925
},
3026
"include": ["src", "../openblocks/src"]
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

client/packages/openblocks-design/src/icons/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,5 @@ export { ReactComponent as GoogleSheetsIcon } from "./icon-query-GoogleSheets.sv
206206
export { ReactComponent as imageEditorIcon } from "./icon-insert-imageEditor.svg";
207207
export { ReactComponent as HomeSettingsIcon } from "./icon-home-settings.svg";
208208
export { ReactComponent as HomeSettingsActiveIcon } from "./icon-home-settings-active.svg";
209+
export { ReactComponent as HelpGithubIcon } from "./icon-help-github.svg";
210+
export { ReactComponent as HelpDiscordIcon } from "./icon-help-discord.svg";

client/packages/openblocks/src/base/codeEditor/completion/exposingCompletionSource.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { checkCursorInBinding } from "../codeEditorUtils";
44
import { Completion, CompletionContext, CompletionResult } from "../codeMirror";
55
import { CompletionSource } from "./completion";
66

7-
const PRIORITY_PROPS = ["value", "selectedRow", "data"];
7+
const PRIORITY_PROPS = ["value", "selectedRow", "data", "text"];
88
const PRIORITY_FUNCTIONS = ["setValue", "setData"];
99

1010
export class ExposingCompletionSource extends CompletionSource {

client/packages/openblocks/src/comps/comps/appSettingsComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ function AppSettingsModal(props: ChildrenInstance) {
235235
);
236236
}}
237237
/>
238-
{props.customShortcuts.getPropertyView()}
239238
</DivStyled>
239+
{props.customShortcuts.getPropertyView()}
240240
</SettingsStyled>
241241
);
242242
}

client/packages/openblocks/src/comps/queries/queryComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let QueryCompTmp = withTypeAndChildren(QueryMap, "js", {
114114
}),
115115
confirmationModal: QueryConfirmationModal,
116116
periodic: BoolPureControl,
117-
periodicTime: millisecondsControl({ left: 0, defaultValue: 5 * 1000 }),
117+
periodicTime: millisecondsControl({ left: 100, defaultValue: 5 * 1000 }),
118118
});
119119

120120
export type QueryChildrenType = InstanceType<typeof QueryCompTmp> extends MultiBaseComp<infer X>

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export const en = {
386386
periodic: "Run this query periodically",
387387
periodicTime: "Period",
388388
periodicTimeTooltip:
389-
"Period between successive executions. Default unit: milliseconds (ms), default: {defaultSeconds} seconds, supported input unit: ms(ms), s(second)",
389+
"Period between successive executions. Default unit: milliseconds (ms), default: {defaultSeconds} seconds, min: 100 milliseconds, supported input unit: ms(ms), s(second)",
390390
dataSourceStatusError:
391391
"The query data source is invalid or does not exist. Update the current query data source.",
392392
success: "Success",
@@ -435,7 +435,7 @@ export const en = {
435435
authenticationType: "Authentication Type",
436436
enableTurnOffPreparedStatement: "Support for switching prepared statements",
437437
enableTurnOffPreparedStatementTooltip:
438-
"You can control whether to enable or disable prepared statements in the query panel",
438+
"You can enable or disable prepared statements in query Advanced tab",
439439
serviceName: "Service name",
440440
serviceNameRequiredMessage: "Please enter your service name",
441441
useSID: "Use SID",
@@ -1176,7 +1176,7 @@ export const en = {
11761176
settings: {
11771177
title: "Settings",
11781178
member: "Members",
1179-
organization: "Workspace",
1179+
organization: "Workspaces",
11801180
audit: "Audit logs",
11811181
theme: "Themes",
11821182
advanced: "Advanced",
@@ -1201,7 +1201,7 @@ export const en = {
12011201
actionColumn: "Operation",
12021202
roleColumn: "Role",
12031203
exitGroup: "Exit Group",
1204-
moveOutGroup: "Move out of group",
1204+
moveOutGroup: "Remove from group",
12051205
inviteUser: "Invite members",
12061206
exitOrg: "Exit the workspace",
12071207
moveOutOrg: "Remove from workspace",
@@ -1217,6 +1217,7 @@ export const en = {
12171217
'{userName} invites you to join the workspace "{organization}", Click on the link to join: {inviteLink}',
12181218
groupName: "Group name",
12191219
createTime: "Create time",
1220+
manageBtn: "Manage",
12201221
},
12211222
orgSettings: {
12221223
newOrg: "New workspace",
@@ -1603,12 +1604,13 @@ export const en = {
16031604
permissionDenyContent:
16041605
"You don't have permission to create the application and data source. Please contact the administrator to join the developer group.",
16051606
appName: "Tutorial application",
1606-
chat: "Chat with support",
1607+
chat: "Chat with us",
16071608
docs: "View documentation",
16081609
editorTutorial: "Editor tutorial",
16091610
update: "What's new?",
16101611
version: "Version",
16111612
versionWithColon: "Version: ",
1613+
submitIssue: "Submit an issue",
16121614
},
16131615
header: {
16141616
nameCheckMessage: "The name cannot be empty",
@@ -1787,7 +1789,7 @@ export const en = {
17871789
showBorder: "Show border",
17881790
},
17891791
docUrls: {
1790-
docHome: "",
1792+
docHome: "https://docs.openblocks.dev/",
17911793
components: "",
17921794
module: "",
17931795
optionList: "",
@@ -1822,5 +1824,6 @@ export const en = {
18221824
},
18231825
openBlocksUrl: {
18241826
createIssue: "https://github.com/openblocks-dev/openblocks/issues",
1827+
discord: "https://discord.com/invite/z5W2YHXdtt",
18251828
},
18261829
};

client/packages/openblocks/src/pages/common/help.tsx

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from "styled-components";
22
import { Layers } from "constants/Layers";
3-
import { HelpIcon, LeftHelpIcon } from "openblocks-design";
3+
import { HelpIcon, LeftHelpIcon, HelpGithubIcon, HelpDiscordIcon } from "openblocks-design";
44
import { VideoIcon, ChatIcon, DocIcon, TutorialIcon, ShortcutIcon } from "assets/icons";
55
import TutorialVideoPic from "assets/images/tutorialVideoThumbnail.png";
66
import { Dropdown, Popover, Tooltip } from "antd";
@@ -166,6 +166,8 @@ type HelpDropdownProps = {
166166
const docHomeUrl = trans("docUrls.docHome");
167167
const changeLogDocUrl = trans("docUrls.changeLog");
168168
const introVideoUrl = trans("docUrls.introVideo");
169+
const issueUrl = trans("openBlocksUrl.createIssue");
170+
const discordUrl = trans("openBlocksUrl.discord");
169171

170172
export function HelpDropdown(props: HelpDropdownProps) {
171173
const [showHelp, setShowHelp] = useState(true);
@@ -239,6 +241,12 @@ export function HelpDropdown(props: HelpDropdownProps) {
239241
case "docs":
240242
window.open(docHomeUrl);
241243
return;
244+
case "issue":
245+
window.open(issueUrl);
246+
return;
247+
case "discord":
248+
window.open(discordUrl);
249+
return;
242250
case "shortcutList":
243251
props.setShowShortcutList?.(true);
244252
return;
@@ -254,8 +262,10 @@ export function HelpDropdown(props: HelpDropdownProps) {
254262
<StyledMenu
255263
$edit={props.isEdit || false}
256264
onClick={(params) => {
265+
if (params.key !== 'version') {
266+
setShowDropdown(false);
267+
}
257268
onMenuClick(params);
258-
setShowDropdown(false);
259269
}}
260270
items={[
261271
introVideoUrl
@@ -276,17 +286,33 @@ export function HelpDropdown(props: HelpDropdownProps) {
276286
),
277287
}
278288
: null,
279-
docHomeUrl
280-
? {
281-
key: "docs",
282-
label: (
283-
<ItemWrapper>
284-
<DocIcon />
285-
<span>{trans("help.docs")}</span>
286-
</ItemWrapper>
287-
),
288-
}
289-
: null,
289+
{
290+
key: "docs",
291+
label: (
292+
<ItemWrapper>
293+
<DocIcon />
294+
<span>{trans("help.docs")}</span>
295+
</ItemWrapper>
296+
),
297+
},
298+
issueUrl ? {
299+
key: "issue",
300+
label: (
301+
<ItemWrapper>
302+
<HelpGithubIcon />
303+
<span>{trans("help.submitIssue")}</span>
304+
</ItemWrapper>
305+
),
306+
} : null,
307+
discordUrl ? {
308+
key: "discord",
309+
label: (
310+
<ItemWrapper>
311+
<HelpDiscordIcon />
312+
<span>{trans("help.chat")}</span>
313+
</ItemWrapper>
314+
),
315+
} : null,
290316
{
291317
key: "editorTutorial",
292318
label: (
@@ -389,6 +415,7 @@ export function HelpDropdown(props: HelpDropdownProps) {
389415
overlay={overlayMenus}
390416
placement="topRight"
391417
trigger={["click"]}
418+
visible={showDropdown}
392419
onVisibleChange={(open: boolean) => setShowDropdown(open)}
393420
>
394421
{props.isEdit ? (

client/packages/openblocks/src/pages/setting/permission/permissionList.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { message, Typography } from "antd";
22
import OrgApi from "api/orgApi";
33
import { buildGroupId } from "constants/routesURL";
4-
import { AddIcon, EditPopover } from "openblocks-design";
4+
import { AddIcon, CustomModal, EditPopover } from "openblocks-design";
55
import { useEffect, useState } from "react";
66
import { useDispatch, useSelector } from "react-redux";
77
import { fetchGroupsAction, updateGroupAction } from "redux/reduxActions/orgActions";
@@ -59,7 +59,9 @@ export default function PermissionSetting() {
5959
})
6060
.then((resp) => {
6161
if (validateResponse(resp)) {
62-
dispatch(fetchGroupsAction(orgId));
62+
setTimeout(() => {
63+
dispatch(fetchGroupsAction(orgId));
64+
}, 200);
6365
}
6466
})
6567
.catch((e) => {
@@ -165,9 +167,9 @@ export default function PermissionSetting() {
165167
ellipsis: true,
166168
render: (value) => (
167169
<span style={{ color: "#8B8FA3" }}>{timestampToHumanReadable(value)}</span>
168-
)
170+
),
169171
},
170-
{ title: " ", dataIndex: "operation", width: "208px" },
172+
{ title: " ", dataIndex: "operation", width: "238px" },
171173
]}
172174
dataSource={dataSource.map((item, i) => ({
173175
key: item.key,
@@ -181,11 +183,23 @@ export default function PermissionSetting() {
181183
buttonType={"primary"}
182184
onClick={() => history.push(buildGroupId(item.key))}
183185
>
184-
{trans("edit")}
186+
{trans("memberSettings.manageBtn")}
185187
</EditBtn>
186188
{(item.del || item.rename) && (
187189
<EditPopover
188-
del={item.del ? () => handleGroupDelete(item.key) : undefined}
190+
del={
191+
item.del
192+
? () => {
193+
CustomModal.confirm({
194+
title: trans("memberSettings.deleteModalTitle"),
195+
content: trans("memberSettings.deleteModalContent"),
196+
onConfirm: () => handleGroupDelete(item.key),
197+
confirmBtnType: "delete",
198+
okText: trans("delete"),
199+
});
200+
}
201+
: undefined
202+
}
189203
rename={item.rename ? () => setNeedRenameId(item.key) : undefined}
190204
>
191205
<PopoverIcon tabIndex={-1} />

client/packages/openblocks/src/pages/setting/permission/styledComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export const OperationWrapper = styled.div`
245245

246246
export const EditBtn = styled(TacoButton)`
247247
opacity: 0;
248-
width: 52px;
248+
min-width: 52px;
249249
height: 24px;
250250
margin-right: 52px;
251251
`;

client/packages/openblocks/src/pages/setting/theme/styledComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export const ConfigItem = styled.div`
438438
}
439439
}
440440
}
441-
@media screen and (max-width: 1705px){
441+
@media screen and (max-width: 1745px){
442442
.text-desc, .config-input {
443443
width: 100%;
444444
}

0 commit comments

Comments
 (0)