mirror of
				https://github.com/usememos/memos.git
				synced 2025-11-01 01:06:04 +08:00 
			
		
		
		
	fix: apply customized profile name in mobile header (#2723)
Fix mobile header title, apply customized profile name
This commit is contained in:
		
							parent
							
								
									f1ee88c4e1
								
							
						
					
					
						commit
						1fdb8b7b01
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -2,6 +2,7 @@ import classNames from "classnames"; | ||||||
| import { useState } from "react"; | import { useState } from "react"; | ||||||
| import useWindowScroll from "react-use/lib/useWindowScroll"; | import useWindowScroll from "react-use/lib/useWindowScroll"; | ||||||
| import useResponsiveWidth from "@/hooks/useResponsiveWidth"; | import useResponsiveWidth from "@/hooks/useResponsiveWidth"; | ||||||
|  | import { useGlobalStore } from "@/store/module"; | ||||||
| import NavigationDrawer from "./NavigationDrawer"; | import NavigationDrawer from "./NavigationDrawer"; | ||||||
| 
 | 
 | ||||||
| interface Props { | interface Props { | ||||||
|  | @ -10,6 +11,8 @@ interface Props { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const MobileHeader = (props: Props) => { | const MobileHeader = (props: Props) => { | ||||||
|  |   const globalStore = useGlobalStore(); | ||||||
|  |   const { systemStatus } = globalStore.state; | ||||||
|   const { className, children } = props; |   const { className, children } = props; | ||||||
|   const { sm } = useResponsiveWidth(); |   const { sm } = useResponsiveWidth(); | ||||||
|   const [titleText] = useState("Memos"); |   const [titleText] = useState("Memos"); | ||||||
|  | @ -29,7 +32,7 @@ const MobileHeader = (props: Props) => { | ||||||
|           className="font-bold text-lg leading-10 mr-1 text-ellipsis shrink-0 cursor-pointer overflow-hidden text-gray-700 dark:text-gray-300" |           className="font-bold text-lg leading-10 mr-1 text-ellipsis shrink-0 cursor-pointer overflow-hidden text-gray-700 dark:text-gray-300" | ||||||
|           onDoubleClick={() => location.reload()} |           onDoubleClick={() => location.reload()} | ||||||
|         > |         > | ||||||
|           {titleText} |           {systemStatus.customizedProfile.name || titleText} | ||||||
|         </span> |         </span> | ||||||
|       </div> |       </div> | ||||||
|       <div className="flex flex-row justify-end items-center">{children}</div> |       <div className="flex flex-row justify-end items-center">{children}</div> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue