From 448ba862872c421422b1884bd497e9c0800af225 Mon Sep 17 00:00:00 2001 From: wenmo <32723967+wenmo@users.noreply.github.com> Date: Thu, 30 Nov 2023 23:36:34 +0800 Subject: [PATCH] [Optimization-2588][studio] Optimize hide console when closing all tabs --- .../src/pages/DataStudio/BottomContainer/index.tsx | 2 +- dinky-web/src/pages/DataStudio/index.tsx | 12 ++++++------ docs/docusaurus.config.js | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dinky-web/src/pages/DataStudio/BottomContainer/index.tsx b/dinky-web/src/pages/DataStudio/BottomContainer/index.tsx index fc32e1fc3b..f841ab502d 100644 --- a/dinky-web/src/pages/DataStudio/BottomContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/BottomContainer/index.tsx @@ -202,7 +202,7 @@ const BottomContainer: React.FC = (props: any) => { marginTop: 0, backgroundColor: '#fff', position: 'fixed', - // bottom: VIEW.footerHeight + bottom: VIEW.footerHeight }} defaultSize={{ width: '100%', height: height }} minHeight={VIEW.midMargin} diff --git a/dinky-web/src/pages/DataStudio/index.tsx b/dinky-web/src/pages/DataStudio/index.tsx index f37a4201e4..8d9561a5d6 100644 --- a/dinky-web/src/pages/DataStudio/index.tsx +++ b/dinky-web/src/pages/DataStudio/index.tsx @@ -71,7 +71,6 @@ const DataStudio = (props: any) => { const themeValue = useThemeValue(); const app = getDvaApp(); // 获取dva的实例 const persist = app._store.persist; - let bottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height; const { fullscreen } = useEditor(); const getClientSize = () => ({ @@ -89,7 +88,8 @@ const DataStudio = (props: any) => { const onResize = () => { setSize(getClientSize()); - const centerContentHeight = getClientSize().contentHeight - bottomHeight; + const newBottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height; + const centerContentHeight = getClientSize().contentHeight - newBottomHeight; updateCenterContentHeight(centerContentHeight); updateToolContentHeight(centerContentHeight - VIEW.leftMargin); }; @@ -117,8 +117,8 @@ const DataStudio = (props: any) => { }; useEffect(() => { - bottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height; - const centerContentHeight = size.contentHeight - bottomHeight; + const newBottomHeight = !isProject ? 0 : bottomContainer.selectKey === '' ? 0 : bottomContainer.height; + const centerContentHeight = size.contentHeight - newBottomHeight; updateCenterContentHeight(centerContentHeight); updateToolContentHeight(centerContentHeight - VIEW.leftMargin); }, [activeKey]); @@ -245,9 +245,9 @@ const DataStudio = (props: any) => { > - + - {isProject && } + {isProject && } diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 6e187ba78d..a5e288fc61 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -133,12 +133,12 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - /*announcementBar: { + announcementBar: { id: 'announcementBar-2', // Increment on change - content: `⭐️   If you like Dinky , give it a star on GitHub . Domain name will be migrated soon , The new domain name is docs.dinky.org.cn`, + content: `⭐️   If you like Dinky , give it a star on GitHub . Domain name will be migrated soon , The new domain name is www.dinky.org.cn`, backgroundColor: "#BBDFFF", isCloseable: false, - },*/ + }, hideOnScroll: false, // 滚动时是否隐藏 | Whether to hide the sidebar on scroll docs: { sidebar: { @@ -269,7 +269,7 @@ const config = { height: 30, }, copyright: `Copyright © ${new Date().getFullYear()} Dinky, Inc. DataLinkDC.
- 鲁ICP备20001630号-2`, + 鲁ICP备20001630号-3`, }, prism: { theme: lightCodeTheme,