This is an automated email from the ASF dual-hosted git repository.

xiaoyu 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 d9a66b22 Optimize the layout of the top "Namespace" (#464)
d9a66b22 is described below

commit d9a66b22e8364adfbac2f001abfa4513d577ec49
Author: Kerwin Bryant <kerwin...@qq.com>
AuthorDate: Thu Jul 25 15:19:17 2024 +0800

    Optimize the layout of the top "Namespace" (#464)
---
 src/components/GlobalHeader/index.js | 66 ++++++++++++++++++++----------------
 1 file changed, 37 insertions(+), 29 deletions(-)

diff --git a/src/components/GlobalHeader/index.js 
b/src/components/GlobalHeader/index.js
index bd985898..b1c0a851 100644
--- a/src/components/GlobalHeader/index.js
+++ b/src/components/GlobalHeader/index.js
@@ -257,36 +257,44 @@ class GlobalHeader extends PureComponent {
         <span className={styles.text}>
           Apache ShenYu Gateway Management System
         </span>
-        <div className={styles.item}>
-          <Dropdown
-            placement="bottomCenter"
-            overlay={
-              <Menu onClick={this.handleNamespacesValueChange}>
-                {namespaces.map((namespace) => {
-                  let isCurrentNamespace =
-                    currentNamespaceId === namespace.namespaceId;
-                  return (
-                    <Menu.Item
-                      key={namespace.namespaceId}
-                      disabled={isCurrentNamespace}
-                    >
-                      <span>{namespace.name}</span>
-                    </Menu.Item>
-                  );
-                })}
-              </Menu>
-            }
-          >
-            <Button>
-              {
-                namespaces.find(
-                  (namespace) => currentNamespaceId === namespace.namespaceId,
-                )?.name
-              }
-            </Button>
-          </Dropdown>
-        </div>
         <div>
+          <div className={styles.item}>
+            <Dropdown
+              placement="bottomCenter"
+              overlay={
+                <Menu onClick={this.handleNamespacesValueChange}>
+                  {namespaces.map((namespace) => {
+                    let isCurrentNamespace =
+                      currentNamespaceId === namespace.namespaceId;
+                    return (
+                      <Menu.Item
+                        key={namespace.namespaceId}
+                        disabled={isCurrentNamespace}
+                      >
+                        <span>{namespace.name}</span>
+                      </Menu.Item>
+                    );
+                  })}
+                </Menu>
+              }
+            >
+              <Button>
+                <a
+                  className="ant-dropdown-link"
+                  style={{ fontWeight: "bold" }}
+                  onClick={(e) => e.preventDefault()}
+                >
+                  {`${getIntlContent("SHENYU.SYSTEM.NAMESPACE")} / ${
+                    namespaces.find(
+                      (namespace) =>
+                        currentNamespaceId === namespace.namespaceId,
+                    )?.name
+                  } `}
+                </a>
+                <Icon type="down" />
+              </Button>
+            </Dropdown>
+          </div>
           <div className={styles.item}>
             <Dropdown placement="bottomCenter" overlay={this.state.help}>
               <Button>

Reply via email to