Skip to content

Commit

Permalink
Update console header link to new nacos.io. (alibaba#12177)
Browse files Browse the repository at this point in the history
  • Loading branch information
KomachiSion authored Jun 5, 2024
1 parent 8a03485 commit d68b904
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
12 changes: 6 additions & 6 deletions console-ui/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ module.exports = {
{
key: 'docs',
text: 'DOCS',
link: 'https://nacos.io/en-us/docs/v2/quickstart/quick-start.html',
link: 'https://nacos.io/en/docs/latest/what-is-nacos/',
},
{
key: 'blog',
text: 'BLOG',
link: 'https://nacos.io/en-us/blog',
link: 'https://nacos.io/en/blog/',
},
{
key: 'community',
text: 'COMMUNITY',
link: 'https://nacos.io/en-us/community',
link: 'https://nacos.io/en/news/',
},
{
key: 'enterprise',
Expand Down Expand Up @@ -97,17 +97,17 @@ module.exports = {
{
key: 'docs',
text: '文档',
link: 'https://nacos.io/zh-cn/docs/v2/what-is-nacos.html',
link: 'https://nacos.io/docs/latest/what-is-nacos/',
},
{
key: 'blog',
text: '博客',
link: 'https://nacos.io/zh-cn/blog/index.html',
link: 'https://nacos.io/blog/',
},
{
key: 'community',
text: '社区',
link: 'https://nacos.io/zh-cn/community/index.html',
link: 'https://nacos.io/news/',
},
{
key: 'enterprise',
Expand Down
9 changes: 5 additions & 4 deletions console-ui/src/layouts/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ class Header extends React.Component {
} = this.props;
const { home, docs, blog, community, enterprise, languageSwitchButton } = locale;
const { passwordResetUser = '', passwordResetUserVisible = false } = this.state;
const BASE_URL = `https://nacos.io/${language.toLocaleLowerCase()}/`;
const BASE_URL =
language.toLocaleLowerCase() === 'en-us' ? 'https://nacos.io/en/' : 'https://nacos.io/';
const NAV_MENU = [
{ id: 1, title: home, link: BASE_URL },
{ id: 2, title: docs, link: `${BASE_URL}docs/v2/what-is-nacos.html` },
{ id: 3, title: blog, link: `${BASE_URL}blog/index.html` },
{ id: 4, title: community, link: `${BASE_URL}community/index.html` },
{ id: 2, title: docs, link: `${BASE_URL}docs/latest/what-is-nacos/` },
{ id: 3, title: blog, link: `${BASE_URL}blog/` },
{ id: 4, title: community, link: `${BASE_URL}news/` },
{
id: 5,
title: enterprise,
Expand Down
4 changes: 2 additions & 2 deletions console/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
<!-- 第三方css结束 -->
<link href="./css/main.css?5b2657aaac80512bd557" rel="stylesheet"></head>
<link href="./css/main.css?d71f900fb2dcffde12ce" rel="stylesheet"></head>

<body>
<div id="root" style="overflow:hidden"></div>
Expand All @@ -56,6 +56,6 @@
<script src="console-ui/public/js/merge.js"></script>
<script src="console-ui/public/js/loader.js"></script>
<!-- 第三方js结束 -->
<script type="text/javascript" src="./js/main.js?5b2657aaac80512bd557"></script></body>
<script type="text/javascript" src="./js/main.js?d71f900fb2dcffde12ce"></script></body>

</html>
4 changes: 2 additions & 2 deletions console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.

0 comments on commit d68b904

Please sign in to comment.