diff --git a/config/webpack.common.js b/config/webpack.common.js
index f702deb4..62803569 100644
--- a/config/webpack.common.js
+++ b/config/webpack.common.js
@@ -72,10 +72,7 @@ module.exports = {
},
},
],
- include: [
- root('src/asset/image/logo-small.svg'),
- root('src/asset/image/logo-extend.svg'),
- ],
+ include: [root('src/asset/image/cloud-logo.svg')],
},
{
test: /\.(woff|woff2|ttf|eot|svg)$/,
@@ -88,10 +85,7 @@ module.exports = {
},
},
],
- exclude: [
- root('src/asset/image/logo-small.svg'),
- root('src/asset/image/logo-extend.svg'),
- ],
+ exclude: [root('src/asset/image/cloud-logo.svg')],
},
],
},
diff --git a/src/asset/image/cloud-logo.svg b/src/asset/image/cloud-logo.svg
new file mode 100644
index 00000000..b2024c36
--- /dev/null
+++ b/src/asset/image/cloud-logo.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/src/asset/image/global-menu.png b/src/asset/image/global-menu.png
new file mode 100644
index 00000000..6b90fc5c
Binary files /dev/null and b/src/asset/image/global-menu.png differ
diff --git a/src/asset/image/logo-extend.svg b/src/asset/image/logo-extend.svg
deleted file mode 100644
index c6f6e49c..00000000
--- a/src/asset/image/logo-extend.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/src/asset/image/logo-small.svg b/src/asset/image/logo-small.svg
deleted file mode 100644
index 763663ef..00000000
--- a/src/asset/image/logo-small.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/components/Layout/GlobalHeader/index.jsx b/src/components/Layout/GlobalHeader/index.jsx
index 41941b80..f293c135 100644
--- a/src/components/Layout/GlobalHeader/index.jsx
+++ b/src/components/Layout/GlobalHeader/index.jsx
@@ -13,14 +13,41 @@
// limitations under the License.
import React from 'react';
-import RightContent from './RightContent';
+import { Link } from 'react-router-dom';
+import cloudLogo from 'asset/image/cloud-logo.svg';
+import { getPath } from 'utils/route-map';
+import classnames from 'classnames';
+import GlobalNav from '../GlobalNav';
import ProjectDropdown from './ProjectDropdown';
+import RightContent from './RightContent';
import styles from './index.less';
export default function HeaderContent(props) {
- const { isAdminPage = false } = props;
+ const { isAdminPage = false, navItems = [] } = props;
+
+ const getRouteName = (routeName) =>
+ isAdminPage ? `${routeName}Admin` : routeName;
+
+ const getRoutePath = (routeName, params = {}, query = {}) => {
+ const realName = getRouteName(routeName);
+ return getPath({ key: realName, params, query });
+ };
+
+ const renderLogo = () => {
+ const homeUrl = getRoutePath('overview');
+ return (
+
+
+
+
+
+ );
+ };
+
return (
+
+ {renderLogo()}
{!isAdminPage && }
diff --git a/src/components/Layout/GlobalHeader/index.less b/src/components/Layout/GlobalHeader/index.less
index f9de405a..bf3cad42 100644
--- a/src/components/Layout/GlobalHeader/index.less
+++ b/src/components/Layout/GlobalHeader/index.less
@@ -108,7 +108,7 @@
z-index: 200;
flex-grow: 1;
height: 100%;
- padding-left: 36px;
+ padding-left: 0;
overflow: hidden;
color: @title-color;
background-color: #fff;
@@ -175,3 +175,15 @@
border-radius: 3px;
}
}
+
+.logo {
+ // margin: @size-medium 38px;
+ float: left;
+ height: @header-height;
+ padding: 0 46px;
+ line-height: @header-height;
+
+ img {
+ height: 30px;
+ }
+}
diff --git a/src/components/Layout/GlobalNav/Left/index.jsx b/src/components/Layout/GlobalNav/Left/index.jsx
new file mode 100644
index 00000000..62144c87
--- /dev/null
+++ b/src/components/Layout/GlobalNav/Left/index.jsx
@@ -0,0 +1,50 @@
+// Copyright 2021 99cloud
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import React from 'react';
+import { Link } from 'react-router-dom';
+import PropTypes from 'prop-types';
+import { navItemPropType, getFirstLevelNavItemLink } from '../common';
+// import { pickFixedParams } from 'utils';
+import styles from './index.less';
+
+export default class Left extends React.Component {
+ static propTypes = {
+ items: PropTypes.arrayOf(navItemPropType),
+ onClose: PropTypes.func,
+ };
+
+ static defaultProps = {
+ items: [],
+ };
+
+ renderItem = (item) => {
+ return (
+