Skip to content

Commit 4247b0c

Browse files
committed
feat: move workspace setting to homepage
1 parent 7e80121 commit 4247b0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1050
-581
lines changed

client/packages/openblocks-design/src/components/Dropdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export function Dropdown<T extends OptionsType>(props: {
152152
allowClear?: boolean;
153153
itemNode?: (value: string) => JSX.Element;
154154
preNode?: () => JSX.Element;
155+
showSearch?: boolean;
155156
}) {
156157
const { placement = "right" } = props;
157158
const valueInfoMap = _.fromPairs(props.options.map((option) => [option.value, option]));
@@ -168,7 +169,7 @@ export function Dropdown<T extends OptionsType>(props: {
168169
<DropdownContainer placement={placement}>
169170
<CustomSelect
170171
dropdownClassName="ob-dropdown-control-select"
171-
showSearch={!props.border}
172+
showSearch={props.showSearch}
172173
filterOption={(input, option) => {
173174
if (!option?.value) {
174175
return false;
Lines changed: 23 additions & 0 deletions
Loading
Lines changed: 23 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
@@ -204,3 +204,5 @@ export { ReactComponent as CollapsibleContainerCompIcon } from "./icon-collapsib
204204
export { ReactComponent as ToggleButtonCompIcon } from "./icon-toggle-button.svg";
205205
export { ReactComponent as GoogleSheetsIcon } from "./icon-query-GoogleSheets.svg";
206206
export { ReactComponent as imageEditorIcon } from "./icon-insert-imageEditor.svg";
207+
export { ReactComponent as HomeSettingsIcon } from "./icon-home-settings.svg";
208+
export { ReactComponent as HomeSettingsActiveIcon } from "./icon-home-settings-active.svg";

client/packages/openblocks/src/app.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,12 @@ class AppIndex extends React.Component<AppIndexProps, any> {
113113
FOLDERS_URL,
114114
FOLDER_URL,
115115
TRASH_URL,
116+
SETTING,
116117
]}
117118
// component={ApplicationListPage}
118119
component={ApplicationHome}
119120
/>
120121
<LazyRoute path={USER_AUTH_URL} load={() => import("@openblocks-ee/pages/userAuth")} />
121-
<LazyRoute
122-
path={SETTING}
123-
fallback="outAppLayout"
124-
load={() => import("pages/setting")}
125-
/>
126122
<LazyRoute
127123
path={INVITE_LANDING_URL}
128124
load={() => import("pages/common/inviteLanding")}

client/packages/openblocks/src/components/ApplicationSelect.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default function ApplicationSelect(props: IAppSelectProps) {
4040
}
4141
return (
4242
<Dropdown
43+
showSearch={true}
4344
value={value}
4445
onChange={(id: string) => onChange?.(id)}
4546
options={applications.map((i) => {

client/packages/openblocks/src/components/Table.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export const Table = styled(AntdTable)`
4848
.ant-table-thead:after {
4949
content: "";
5050
position: absolute;
51-
left: 8px;
52-
right: 8px;
51+
left: 12px;
52+
right: 12px;
5353
bottom: 0;
5454
background: #e1e3eb;
5555
height: 1px;
@@ -59,8 +59,8 @@ export const Table = styled(AntdTable)`
5959
.ant-table-row:after {
6060
content: "";
6161
position: absolute;
62-
left: 8px;
63-
right: 8px;
62+
left: 12px;
63+
right: 12px;
6464
bottom: 0;
6565
background: #f0f0f0;
6666
height: 1px;
@@ -105,4 +105,7 @@ export const Table = styled(AntdTable)`
105105
.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container::after {
106106
box-shadow: none;
107107
}
108+
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
109+
padding: 16px 12px;
110+
}
108111
`;

client/packages/openblocks/src/components/layout/SideBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Sider = styled(Layout.Sider)`
2525
export default function SideBar(props: SiderProps) {
2626
const { children, ...otherProps } = props;
2727
return (
28-
<Sider theme="light" width={240} {...otherProps}>
28+
<Sider theme="light" width={244} {...otherProps}>
2929
{props.children}
3030
</Sider>
3131
);

client/packages/openblocks/src/components/layout/SubSideBar.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@ import { PropsWithChildren } from "react";
22
import styled from "styled-components";
33

44
const Wrapper = styled.div`
5-
min-width: 227px;
6-
width: 227px;
5+
min-width: 232px;
6+
width: 232px;
77
height: 100%;
88
background: #ffffff;
99
border-right: 1px solid #f0f0f0;
1010
box-sizing: border-box;
1111
border-radius: 2px;
12-
padding: 32px 24px 0 24px;
12+
padding: 32px 16px 0 16px;
1313
1414
h2 {
1515
font-weight: 500;
16-
font-size: 18px;
16+
font-size: 20px;
1717
color: #222222;
18-
line-height: 18px;
1918
margin: 0 0 20px 12px;
2019
}
20+
.ant-menu-inline .ant-menu-item {
21+
margin: 4px 0;
22+
}
23+
.ant-menu-item:hover, .ant-menu-item-selected {
24+
border-radius: 4px;
25+
}
2126
`;
2227

2328
interface IProps {

client/packages/openblocks/src/comps/comps/layout/layoutMenuItemComp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function AppSelectorPropertyView(props: {
4848

4949
return (
5050
<Dropdown
51+
showSearch={true}
5152
value={appId}
5253
options={options}
5354
label={trans("aggregation.chooseApp")}

0 commit comments

Comments
 (0)