This is an automated email from the ASF dual-hosted git repository.
likeguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 89c450c9 New help entry, convenient for users to seek support (#318)
89c450c9 is described below
commit 89c450c95698f5abcae8672694591ccb84ac9a6b
Author: Kerwin Bryant <[email protected]>
AuthorDate: Wed Aug 16 21:45:01 2023 +0800
New help entry, convenient for users to seek support (#318)
---
src/components/GlobalHeader/index.js | 34 +++++++++++++++++++++++++++-------
src/components/GlobalHeader/index.less | 8 ++++++--
2 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/src/components/GlobalHeader/index.js
b/src/components/GlobalHeader/index.js
index 61f854a7..16e179c2 100644
--- a/src/components/GlobalHeader/index.js
+++ b/src/components/GlobalHeader/index.js
@@ -52,6 +52,16 @@ class GlobalHeader extends PureComponent {
constructor(props) {
super(props);
this.state = {
+ help: (
+ <Menu>
+ <Menu.Item>
+ <span><a href="https://shenyu.apache.org" target="_blank"
rel="noreferrer">Website</a></span>
+ </Menu.Item>
+ <Menu.Item>
+ <span><a href="https://github.com/apache/shenyu" target="_blank"
rel="noreferrer">Github</a></span>
+ </Menu.Item>
+ </Menu>
+ ),
menu: (
<Menu onClick={this.handleLocalesValueChange}>
<Menu.Item key="0">
@@ -134,13 +144,23 @@ class GlobalHeader extends PureComponent {
<div className={styles.header}>
<span className={styles.text}>Apache ShenYu Gateway Management
System</span>
<div>
- <Dropdown
- placement="bottomCenter"
- overlay={this.state.menu}
- >
- <Button><TranslationOutlined /></Button>
- </Dropdown>
- <div className={styles.right}>
+ <div className={styles.item}>
+ <Dropdown
+ placement="bottomCenter"
+ overlay={this.state.help}
+ >
+ <Button><Icon type="question-circle" /></Button>
+ </Dropdown>
+ </div>
+ <div className={styles.item}>
+ <Dropdown
+ placement="bottomCenter"
+ overlay={this.state.menu}
+ >
+ <Button><TranslationOutlined /></Button>
+ </Dropdown>
+ </div>
+ <div className={`${styles.item} ${styles.right}`}>
<Dropdown.Button overlay={menu} icon={<Icon type="user" />}>
<span>
{userName}
diff --git a/src/components/GlobalHeader/index.less
b/src/components/GlobalHeader/index.less
index bace7494..8d9a87c1 100644
--- a/src/components/GlobalHeader/index.less
+++ b/src/components/GlobalHeader/index.less
@@ -83,8 +83,12 @@ i.trigger {
}
}
-.right {
+.item {
+ display: inline;
margin-left: 13px;
+}
+
+.right {
float: right;
height: 100%;
cursor: pointer;
@@ -163,4 +167,4 @@ i.trigger {
}
}
}
-}
\ No newline at end of file
+}