Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
1fdb8b7b
Unverified
Commit
1fdb8b7b
authored
Jan 16, 2024
by
Wen Sun
Committed by
GitHub
Jan 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: apply customized profile name in mobile header (#2723)
Fix mobile header title, apply customized profile name
parent
f1ee88c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
MobileHeader.tsx
web/src/components/MobileHeader.tsx
+4
-1
No files found.
web/src/components/MobileHeader.tsx
View file @
1fdb8b7b
...
@@ -2,6 +2,7 @@ import classNames from "classnames";
...
@@ -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 {
...
@@ -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) => {
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment