Skip to content

Commit

Permalink
refactor: remove the environment variable copyright hide (apache#8134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet authored Oct 8, 2024
1 parent 88a26a2 commit 0b8c8ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion config-ui/env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 10 additions & 16 deletions config-ui/src/routes/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 0b8c8ea

Please sign in to comment.