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

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 5f2aa79  [Feature][UI Next] Add navbar username. (#8108)
5f2aa79 is described below

commit 5f2aa79c09bfc6e6da47cca840caed1af8a2727f
Author: songjianet <[email protected]>
AuthorDate: Tue Jan 18 21:28:49 2022 +0800

    [Feature][UI Next] Add navbar username. (#8108)
---
 .../src/layouts/content/components/user/index.tsx              | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx 
b/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
index 4cc2a92..dc795d1 100644
--- a/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
+++ b/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
@@ -17,9 +17,11 @@
 
 import { defineComponent, PropType } from 'vue'
 import { NDropdown, NIcon, NButton } from 'naive-ui'
-import styles from './index.module.scss'
 import { DownOutlined, UserOutlined } from '@vicons/antd'
 import { useDropDown } from './use-dropdown'
+import { useUserStore } from '@/store/user/user'
+import styles from './index.module.scss'
+import type { UserInfoRes } from '@/service/modules/users/types'
 
 const User = defineComponent({
   name: 'User',
@@ -31,7 +33,9 @@ const User = defineComponent({
   },
   setup() {
     const { handleSelect } = useDropDown()
-    return { handleSelect }
+    const userStore = useUserStore()
+
+    return { handleSelect, userStore }
   },
   render() {
     return (
@@ -45,7 +49,7 @@ const User = defineComponent({
           <NIcon class={styles.icon}>
             <UserOutlined />
           </NIcon>
-          admin
+          {(this.userStore.getUserInfo as UserInfoRes).userName}
           <NIcon class={styles.icon}>
             <DownOutlined />
           </NIcon>

Reply via email to