This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 0b8c8ea25 refactor: remove the environment variable copyright hide 
(#8134)
0b8c8ea25 is described below

commit 0b8c8ea251917e6d04c1b168dd91f4a8fa0dc716
Author: 青湛 <0x1304...@gmail.com>
AuthorDate: Tue Oct 8 22:35:54 2024 +1300

    refactor: remove the environment variable copyright hide (#8134)
---
 config-ui/env.example                  |  1 -
 config-ui/src/routes/layout/layout.tsx | 26 ++++++++++----------------
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/config-ui/env.example b/config-ui/env.example
index 078e902a5..723a06fd3 100644
--- a/config-ui/env.example
+++ b/config-ui/env.example
@@ -19,7 +19,6 @@
 # DEVLAKE_PATH_PREFIX=
 # DEVLAKE_TITLE_CUSTOM=
 # DEVLAKE_COLOR_CUSTOM=
-# DEVLAKE_COPYRIGHT_HIDE=
 
 # All plugins are loaded by default, optional plugins can be loaded
 # eg. DEVLAKE_PLUGINS=github,gitlab
diff --git a/config-ui/src/routes/layout/layout.tsx 
b/config-ui/src/routes/layout/layout.tsx
index 2591722f5..b33b563ed 100644
--- a/config-ui/src/routes/layout/layout.tsx
+++ b/config-ui/src/routes/layout/layout.tsx
@@ -113,28 +113,22 @@ export const Layout = () => {
             background: 'transparent',
           }}
         >
-          {headerItems
-            .filter((item) =>
-              import.meta.env.DEVLAKE_COPYRIGHT_HIDE ? !['Dashboards', 
'GitHub', 'Slack'].includes(item.label) : true,
-            )
-            .map((item, i, arr) => (
-              <ExternalLink key={item.label} link={item.link} style={{ 
display: 'flex', alignItems: 'center' }}>
-                {item.icon}
-                <span style={{ marginLeft: 4 }}>{item.label}</span>
-                {i !== arr.length - 1 && <Divider type="vertical" />}
-              </ExternalLink>
-            ))}
+          {headerItems.map((item, i, arr) => (
+            <ExternalLink key={item.label} link={item.link} style={{ display: 
'flex', alignItems: 'center' }}>
+              {item.icon}
+              <span style={{ marginLeft: 4 }}>{item.label}</span>
+              {i !== arr.length - 1 && <Divider type="vertical" />}
+            </ExternalLink>
+          ))}
         </Header>
         <Content style={{ overflowY: 'auto' }}>
           <div style={{ padding: 24, margin: '0 auto', maxWidth: 1280, 
minWidth: 960 }}>
             <OnboardCard style={{ marginBottom: 32 }} />
             <Outlet />
           </div>
-          {!import.meta.env.DEVLAKE_COPYRIGHT_HIDE && (
-            <Footer>
-              <p style={{ textAlign: 'center' }}>Apache 2.0 License</p>
-            </Footer>
-          )}
+          <Footer>
+            <p style={{ textAlign: 'center' }}>Apache 2.0 License</p>
+          </Footer>
         </Content>
       </AntdLayout>
     </AntdLayout>

Reply via email to