Skip to content

Commit

Permalink
Resolve code conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwenmo committed Sep 2, 2023
1 parent f476ed3 commit e970f2b
Showing 1 changed file with 96 additions and 92 deletions.
188 changes: 96 additions & 92 deletions dinky-web/src/pages/DataStudio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,60 +227,59 @@ const DataStudio = (props: any) => {
const access = useAccess();

return (

<PageContainer title={false} breadcrumb={{ style: { display: 'none' } }}>
<PersistGate loading={null} persistor={persist}>
<div style={{ marginInline: -10, marginBlock: -5 }}>
{/* 渲染 header */}
{renderHeaderContainer()}
<Layout hasSider style={{ minHeight: size.contentHeight, paddingInline: 0 }}>
{/*渲染左侧侧边栏*/}
<Sider collapsed collapsedWidth={40}>
<Menu
mode='inline'
selectedKeys={[leftContainer.selectKey]}
items={LeftSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
).map((x) => ({
key: x.key,
label: x.label,
icon: x.icon
}))}
style={{
height: '50%',
borderBlockStart: `1px solid ${themeValue.borderColor}`,
borderInlineEnd: `1px solid ${themeValue.borderColor}`
}}
onClick={(item) =>
updateSelectLeftKey(item.key === leftContainer.selectKey ? '' : item.key)
}
/>

{/*底部菜单*/}
<Menu
mode='inline'
selectedKeys={[bottomContainer.selectKey]}
items={LeftBottomSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
).map((x) => ({
key: x.key,
label: x.label,
icon: x.icon
}))}
style={{
display: 'flex',
height: '50%',
flexDirection: 'column-reverse',
borderInlineEnd: `1px solid ${themeValue.borderColor}`
}}
onClick={(item) => {
updateSelectBottomKey(item.key === bottomContainer.selectKey ? '' : item.key);
if (
bottomContainer.selectKey !== '' &&
!bottomContainer.selectSubKey[item.key] &&
LeftBottomMoreTabs[item.key]
) {
updateSelectBottomSubKey(LeftBottomMoreTabs[item.key][0].key);
<PersistGate loading={null} persistor={persist}>
<div style={{ marginInline: -10, marginBlock: -5 }}>
{/* 渲染 header */}
{renderHeaderContainer()}
<Layout hasSider style={{ minHeight: size.contentHeight, paddingInline: 0 }}>
{/*渲染左侧侧边栏*/}
<Sider collapsed collapsedWidth={40}>
<Menu
mode='inline'
selectedKeys={[leftContainer.selectKey]}
items={LeftSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
).map((x) => ({
key: x.key,
label: x.label,
icon: x.icon
}))}
style={{
height: '50%',
borderBlockStart: `1px solid ${themeValue.borderColor}`,
borderInlineEnd: `1px solid ${themeValue.borderColor}`
}}
onClick={(item) =>
updateSelectLeftKey(item.key === leftContainer.selectKey ? '' : item.key)
}
/>

{/*底部菜单*/}
<Menu
mode='inline'
selectedKeys={[bottomContainer.selectKey]}
items={LeftBottomSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
).map((x) => ({
key: x.key,
label: x.label,
icon: x.icon
}))}
style={{
display: 'flex',
height: '50%',
flexDirection: 'column-reverse',
borderInlineEnd: `1px solid ${themeValue.borderColor}`
}}
onClick={(item) => {
updateSelectBottomKey(item.key === bottomContainer.selectKey ? '' : item.key);
if (
bottomContainer.selectKey !== '' &&
!bottomContainer.selectSubKey[item.key] &&
LeftBottomMoreTabs[item.key]
) {
updateSelectBottomSubKey(LeftBottomMoreTabs[item.key][0].key);
}
}}
/>
Expand Down Expand Up @@ -314,45 +313,50 @@ const DataStudio = (props: any) => {
>
<MiddleContainer />
</Content>
{/* 渲染右侧侧边栏 */}
<Sider collapsed collapsedWidth={40}>
<Menu
selectedKeys={[rightContainer.selectKey]}
mode='inline'
style={{
height: '100%',
borderInlineStart: `1px solid ${themeValue.borderColor}`,
borderBlockStart: `1px solid ${themeValue.borderColor}`
}}
items={RightSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
)
.filter((x) => {
if (!x.isShow) {
return true;
}
if (parseInt(tabs.activeKey) < 0) {
return TabsPageType.None;
}
const v = (tabs.panes as TabsItemType[]).find(
(item) => item.key === tabs.activeKey
);
return x.isShow(v?.type ?? TabsPageType.None, v?.subType);
})
.map((x) => {
return { key: x.key, label: x.label, icon: x.icon };
})}
onClick={(item) =>
updateSelectRightKey(item.key === rightContainer.selectKey ? '' : item.key)
}
/>
</Sider>
</Layout>
{/* 页脚 */}
{<FooterContainer token={token} />}
</div>
</PersistGate>
</PageContainer>

{renderRightContainer()}
</div>
</Content>

{/* 渲染右侧侧边栏 */}
<Sider collapsed collapsedWidth={40}>
<Menu
selectedKeys={[rightContainer.selectKey]}
mode='inline'
style={{
height: '100%',
borderInlineStart: `1px solid ${themeValue.borderColor}`,
borderBlockStart: `1px solid ${themeValue.borderColor}`
}}
items={RightSide.filter((x) =>
AuthorizedObject({ path: x.auth, children: x, access })
)
.filter((x) => {
if (!x.isShow) {
return true;
}
if (parseInt(tabs.activeKey) < 0) {
return TabsPageType.None;
}
const v = (tabs.panes as TabsItemType[]).find(
(item) => item.key === tabs.activeKey
);
return x.isShow(v?.type ?? TabsPageType.None, v?.subType);
})
.map((x) => {
return { key: x.key, label: x.label, icon: x.icon };
})}
onClick={(item) =>
updateSelectRightKey(item.key === rightContainer.selectKey ? '' : item.key)
}
/>
</Sider>
</Layout>
{/* 页脚 */}
{<FooterContainer token={token} />}
</div>
</PersistGate>
</PageContainer>
);
};

Expand Down

0 comments on commit e970f2b

Please sign in to comment.