Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove the environment variable copyright hide #8134

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading