Skip to content

Commit

Permalink
change version to 1.1.1 & add help text
Browse files Browse the repository at this point in the history
  • Loading branch information
QIQI03 committed Nov 28, 2022
1 parent 71862ce commit 95de3f4
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 37 deletions.
2 changes: 1 addition & 1 deletion client/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1
8 changes: 2 additions & 6 deletions client/packages/openblocks-comps/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
"baseUrl": "./src",
"paths": {
"@openblocks-ee/*": ["../../openblocks/src/*"],
"*": [
"*",
"../../openblocks/src/*",
"../../openblocks-sdk/src/*",
"../../openblocks-design/src/*"
]
"openblocks-sdk": ["../../openblocks/src/index.sdk"],
"*": ["*", "../../openblocks/src/*", "../../openblocks-design/src/*"]
}
},
"include": ["src", "../openblocks/src"]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions client/packages/openblocks-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,5 @@ export { ReactComponent as GoogleSheetsIcon } from "./icon-query-GoogleSheets.sv
export { ReactComponent as imageEditorIcon } from "./icon-insert-imageEditor.svg";
export { ReactComponent as HomeSettingsIcon } from "./icon-home-settings.svg";
export { ReactComponent as HomeSettingsActiveIcon } from "./icon-home-settings-active.svg";
export { ReactComponent as HelpGithubIcon } from "./icon-help-github.svg";
export { ReactComponent as HelpDiscordIcon } from "./icon-help-discord.svg";
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { checkCursorInBinding } from "../codeEditorUtils";
import { Completion, CompletionContext, CompletionResult } from "../codeMirror";
import { CompletionSource } from "./completion";

const PRIORITY_PROPS = ["value", "selectedRow", "data"];
const PRIORITY_PROPS = ["value", "selectedRow", "data", "text"];
const PRIORITY_FUNCTIONS = ["setValue", "setData"];

export class ExposingCompletionSource extends CompletionSource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ function AppSettingsModal(props: ChildrenInstance) {
);
}}
/>
{props.customShortcuts.getPropertyView()}
</DivStyled>
{props.customShortcuts.getPropertyView()}
</SettingsStyled>
);
}
Expand Down
2 changes: 1 addition & 1 deletion client/packages/openblocks/src/comps/queries/queryComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ let QueryCompTmp = withTypeAndChildren(QueryMap, "js", {
}),
confirmationModal: QueryConfirmationModal,
periodic: BoolPureControl,
periodicTime: millisecondsControl({ left: 0, defaultValue: 5 * 1000 }),
periodicTime: millisecondsControl({ left: 100, defaultValue: 5 * 1000 }),
});

export type QueryChildrenType = InstanceType<typeof QueryCompTmp> extends MultiBaseComp<infer X>
Expand Down
15 changes: 9 additions & 6 deletions client/packages/openblocks/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export const en = {
periodic: "Run this query periodically",
periodicTime: "Period",
periodicTimeTooltip:
"Period between successive executions. Default unit: milliseconds (ms), default: {defaultSeconds} seconds, supported input unit: ms(ms), s(second)",
"Period between successive executions. Default unit: milliseconds (ms), default: {defaultSeconds} seconds, min: 100 milliseconds, supported input unit: ms(ms), s(second)",
dataSourceStatusError:
"The query data source is invalid or does not exist. Update the current query data source.",
success: "Success",
Expand Down Expand Up @@ -435,7 +435,7 @@ export const en = {
authenticationType: "Authentication Type",
enableTurnOffPreparedStatement: "Support for switching prepared statements",
enableTurnOffPreparedStatementTooltip:
"You can control whether to enable or disable prepared statements in the query panel",
"You can enable or disable prepared statements in query Advanced tab",
serviceName: "Service name",
serviceNameRequiredMessage: "Please enter your service name",
useSID: "Use SID",
Expand Down Expand Up @@ -1176,7 +1176,7 @@ export const en = {
settings: {
title: "Settings",
member: "Members",
organization: "Workspace",
organization: "Workspaces",
audit: "Audit logs",
theme: "Themes",
advanced: "Advanced",
Expand All @@ -1201,7 +1201,7 @@ export const en = {
actionColumn: "Operation",
roleColumn: "Role",
exitGroup: "Exit Group",
moveOutGroup: "Move out of group",
moveOutGroup: "Remove from group",
inviteUser: "Invite members",
exitOrg: "Exit the workspace",
moveOutOrg: "Remove from workspace",
Expand All @@ -1217,6 +1217,7 @@ export const en = {
'{userName} invites you to join the workspace "{organization}", Click on the link to join: {inviteLink}',
groupName: "Group name",
createTime: "Create time",
manageBtn: "Manage",
},
orgSettings: {
newOrg: "New workspace",
Expand Down Expand Up @@ -1603,12 +1604,13 @@ export const en = {
permissionDenyContent:
"You don't have permission to create the application and data source. Please contact the administrator to join the developer group.",
appName: "Tutorial application",
chat: "Chat with support",
chat: "Chat with us",
docs: "View documentation",
editorTutorial: "Editor tutorial",
update: "What's new?",
version: "Version",
versionWithColon: "Version: ",
submitIssue: "Submit an issue",
},
header: {
nameCheckMessage: "The name cannot be empty",
Expand Down Expand Up @@ -1787,7 +1789,7 @@ export const en = {
showBorder: "Show border",
},
docUrls: {
docHome: "",
docHome: "https://docs.openblocks.dev/",
components: "",
module: "",
optionList: "",
Expand Down Expand Up @@ -1822,5 +1824,6 @@ export const en = {
},
openBlocksUrl: {
createIssue: "https://github.com/openblocks-dev/openblocks/issues",
discord: "https://discord.com/invite/z5W2YHXdtt",
},
};
53 changes: 40 additions & 13 deletions client/packages/openblocks/src/pages/common/help.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";
import { Layers } from "constants/Layers";
import { HelpIcon, LeftHelpIcon } from "openblocks-design";
import { HelpIcon, LeftHelpIcon, HelpGithubIcon, HelpDiscordIcon } from "openblocks-design";
import { VideoIcon, ChatIcon, DocIcon, TutorialIcon, ShortcutIcon } from "assets/icons";
import TutorialVideoPic from "assets/images/tutorialVideoThumbnail.png";
import { Dropdown, Popover, Tooltip } from "antd";
Expand Down Expand Up @@ -166,6 +166,8 @@ type HelpDropdownProps = {
const docHomeUrl = trans("docUrls.docHome");
const changeLogDocUrl = trans("docUrls.changeLog");
const introVideoUrl = trans("docUrls.introVideo");
const issueUrl = trans("openBlocksUrl.createIssue");
const discordUrl = trans("openBlocksUrl.discord");

export function HelpDropdown(props: HelpDropdownProps) {
const [showHelp, setShowHelp] = useState(true);
Expand Down Expand Up @@ -239,6 +241,12 @@ export function HelpDropdown(props: HelpDropdownProps) {
case "docs":
window.open(docHomeUrl);
return;
case "issue":
window.open(issueUrl);
return;
case "discord":
window.open(discordUrl);
return;
case "shortcutList":
props.setShowShortcutList?.(true);
return;
Expand All @@ -254,8 +262,10 @@ export function HelpDropdown(props: HelpDropdownProps) {
<StyledMenu
$edit={props.isEdit || false}
onClick={(params) => {
if (params.key !== 'version') {
setShowDropdown(false);
}
onMenuClick(params);
setShowDropdown(false);
}}
items={[
introVideoUrl
Expand All @@ -276,17 +286,33 @@ export function HelpDropdown(props: HelpDropdownProps) {
),
}
: null,
docHomeUrl
? {
key: "docs",
label: (
<ItemWrapper>
<DocIcon />
<span>{trans("help.docs")}</span>
</ItemWrapper>
),
}
: null,
{
key: "docs",
label: (
<ItemWrapper>
<DocIcon />
<span>{trans("help.docs")}</span>
</ItemWrapper>
),
},
issueUrl ? {
key: "issue",
label: (
<ItemWrapper>
<HelpGithubIcon />
<span>{trans("help.submitIssue")}</span>
</ItemWrapper>
),
} : null,
discordUrl ? {
key: "discord",
label: (
<ItemWrapper>
<HelpDiscordIcon />
<span>{trans("help.chat")}</span>
</ItemWrapper>
),
} : null,
{
key: "editorTutorial",
label: (
Expand Down Expand Up @@ -389,6 +415,7 @@ export function HelpDropdown(props: HelpDropdownProps) {
overlay={overlayMenus}
placement="topRight"
trigger={["click"]}
visible={showDropdown}
onVisibleChange={(open: boolean) => setShowDropdown(open)}
>
{props.isEdit ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { message, Typography } from "antd";
import OrgApi from "api/orgApi";
import { buildGroupId } from "constants/routesURL";
import { AddIcon, EditPopover } from "openblocks-design";
import { AddIcon, CustomModal, EditPopover } from "openblocks-design";
import { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { fetchGroupsAction, updateGroupAction } from "redux/reduxActions/orgActions";
Expand Down Expand Up @@ -59,7 +59,9 @@ export default function PermissionSetting() {
})
.then((resp) => {
if (validateResponse(resp)) {
dispatch(fetchGroupsAction(orgId));
setTimeout(() => {
dispatch(fetchGroupsAction(orgId));
}, 200);
}
})
.catch((e) => {
Expand Down Expand Up @@ -165,9 +167,9 @@ export default function PermissionSetting() {
ellipsis: true,
render: (value) => (
<span style={{ color: "#8B8FA3" }}>{timestampToHumanReadable(value)}</span>
)
),
},
{ title: " ", dataIndex: "operation", width: "208px" },
{ title: " ", dataIndex: "operation", width: "238px" },
]}
dataSource={dataSource.map((item, i) => ({
key: item.key,
Expand All @@ -181,11 +183,23 @@ export default function PermissionSetting() {
buttonType={"primary"}
onClick={() => history.push(buildGroupId(item.key))}
>
{trans("edit")}
{trans("memberSettings.manageBtn")}
</EditBtn>
{(item.del || item.rename) && (
<EditPopover
del={item.del ? () => handleGroupDelete(item.key) : undefined}
del={
item.del
? () => {
CustomModal.confirm({
title: trans("memberSettings.deleteModalTitle"),
content: trans("memberSettings.deleteModalContent"),
onConfirm: () => handleGroupDelete(item.key),
confirmBtnType: "delete",
okText: trans("delete"),
});
}
: undefined
}
rename={item.rename ? () => setNeedRenameId(item.key) : undefined}
>
<PopoverIcon tabIndex={-1} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const OperationWrapper = styled.div`

export const EditBtn = styled(TacoButton)`
opacity: 0;
width: 52px;
min-width: 52px;
height: 24px;
margin-right: 52px;
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export const ConfigItem = styled.div`
}
}
}
@media screen and (max-width: 1705px){
@media screen and (max-width: 1745px){
.text-desc, .config-input {
width: 100%;
}
Expand Down

0 comments on commit 95de3f4

Please sign in to comment.