Unverified Commit 93f345de authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Optimization-2588][studio] Optimize hide console when closing all tabs (#2590)

parent 7e5f22d8
...@@ -202,7 +202,7 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => { ...@@ -202,7 +202,7 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
marginTop: 0, marginTop: 0,
backgroundColor: '#fff', backgroundColor: '#fff',
position: 'fixed', position: 'fixed',
// bottom: VIEW.footerHeight bottom: VIEW.footerHeight
}} }}
defaultSize={{ width: '100%', height: height }} defaultSize={{ width: '100%', height: height }}
minHeight={VIEW.midMargin} minHeight={VIEW.midMargin}
......
...@@ -71,7 +71,6 @@ const DataStudio = (props: any) => { ...@@ -71,7 +71,6 @@ const DataStudio = (props: any) => {
const themeValue = useThemeValue(); const themeValue = useThemeValue();
const app = getDvaApp(); // 获取dva的实例 const app = getDvaApp(); // 获取dva的实例
const persist = app._store.persist; const persist = app._store.persist;
let bottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height;
const { fullscreen } = useEditor(); const { fullscreen } = useEditor();
const getClientSize = () => ({ const getClientSize = () => ({
...@@ -89,7 +88,8 @@ const DataStudio = (props: any) => { ...@@ -89,7 +88,8 @@ const DataStudio = (props: any) => {
const onResize = () => { const onResize = () => {
setSize(getClientSize()); setSize(getClientSize());
const centerContentHeight = getClientSize().contentHeight - bottomHeight; const newBottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height;
const centerContentHeight = getClientSize().contentHeight - newBottomHeight;
updateCenterContentHeight(centerContentHeight); updateCenterContentHeight(centerContentHeight);
updateToolContentHeight(centerContentHeight - VIEW.leftMargin); updateToolContentHeight(centerContentHeight - VIEW.leftMargin);
}; };
...@@ -117,8 +117,8 @@ const DataStudio = (props: any) => { ...@@ -117,8 +117,8 @@ const DataStudio = (props: any) => {
}; };
useEffect(() => { useEffect(() => {
bottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height; const newBottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height;
const centerContentHeight = size.contentHeight - bottomHeight; const centerContentHeight = size.contentHeight - newBottomHeight;
updateCenterContentHeight(centerContentHeight); updateCenterContentHeight(centerContentHeight);
updateToolContentHeight(centerContentHeight - VIEW.leftMargin); updateToolContentHeight(centerContentHeight - VIEW.leftMargin);
}, [activeKey]); }, [activeKey]);
...@@ -245,9 +245,9 @@ const DataStudio = (props: any) => { ...@@ -245,9 +245,9 @@ const DataStudio = (props: any) => {
> >
<MiddleContainer /> <MiddleContainer />
</Content> </Content>
<RightContainer size={size} bottomHeight={bottomHeight} /> <RightContainer size={size} bottomHeight={bottomContainer.height} />
</div> </div>
{isProject && <BottomContainer size={size} height={bottomHeight} />} {isProject && <BottomContainer size={size} height={bottomContainer.height} />}
</Content> </Content>
<Sider collapsed collapsedWidth={40}> <Sider collapsed collapsedWidth={40}>
......
...@@ -133,12 +133,12 @@ const config = { ...@@ -133,12 +133,12 @@ const config = {
themeConfig: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({ ({
/*announcementBar: { announcementBar: {
id: 'announcementBar-2', // Increment on change id: 'announcementBar-2', // Increment on change
content: `⭐️ &nbsp; If you like Dinky , give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/DataLinkDC/dlink">GitHub</a> . Domain name will be migrated soon , The new domain name is <a target="_blank" rel="noopener noreferrer" href="http://docs.dinky.org.cn">docs.dinky.org.cn</a>`, content: `⭐️ &nbsp; If you like Dinky , give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/DataLinkDC/dlink">GitHub</a> . Domain name will be migrated soon , The new domain name is <a target="_blank" rel="noopener noreferrer" href="http://www.dinky.org.cn">www.dinky.org.cn</a>`,
backgroundColor: "#BBDFFF", backgroundColor: "#BBDFFF",
isCloseable: false, isCloseable: false,
},*/ },
hideOnScroll: false, // 滚动时是否隐藏 | Whether to hide the sidebar on scroll hideOnScroll: false, // 滚动时是否隐藏 | Whether to hide the sidebar on scroll
docs: { docs: {
sidebar: { sidebar: {
...@@ -269,7 +269,7 @@ const config = { ...@@ -269,7 +269,7 @@ const config = {
height: 30, height: 30,
}, },
copyright: `Copyright © ${new Date().getFullYear()} Dinky, Inc. DataLinkDC.<br/> copyright: `Copyright © ${new Date().getFullYear()} Dinky, Inc. DataLinkDC.<br/>
<a href="https://beian.miit.gov.cn" target="_blank">鲁ICP备20001630号-2</a>`, <a href="https://beian.miit.gov.cn" target="_blank">鲁ICP备20001630号-3</a>`,
}, },
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment