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
547f2517
Unverified
Commit
547f2517
authored
Mar 22, 2023
by
boojack
Committed by
GitHub
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add rss button in user menu (#1401)
parent
9c0a3ff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
UserBanner.tsx
web/src/components/UserBanner.tsx
+14
-6
No files found.
web/src/components/UserBanner.tsx
View file @
547f2517
...
@@ -5,6 +5,7 @@ import Dropdown from "./base/Dropdown";
...
@@ -5,6 +5,7 @@ import Dropdown from "./base/Dropdown";
import
showAboutSiteDialog
from
"./AboutSiteDialog"
;
import
showAboutSiteDialog
from
"./AboutSiteDialog"
;
import
UserAvatar
from
"./UserAvatar"
;
import
UserAvatar
from
"./UserAvatar"
;
import
showSettingDialog
from
"./SettingDialog"
;
import
showSettingDialog
from
"./SettingDialog"
;
import
Icon
from
"./Icon"
;
const
UserBanner
=
()
=>
{
const
UserBanner
=
()
=>
{
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
...
@@ -51,25 +52,32 @@ const UserBanner = () => {
...
@@ -51,25 +52,32 @@ const UserBanner = () => {
{
!
userStore
.
isVisitorMode
()
&&
(
{
!
userStore
.
isVisitorMode
()
&&
(
<>
<>
<
button
<
button
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded
flex flex-row justify-start items-center
dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
onClick=
{
handleMyAccountClick
}
onClick=
{
handleMyAccountClick
}
>
>
<
span
className=
"mr-1"
>
🤠
</
span
>
{
t
(
"setting.my-account"
)
}
<
Icon
.
User
className=
"w-5 h-auto mr-2 opacity-80"
/
>
{
t
(
"setting.my-account"
)
}
</
button
>
</
button
>
<
a
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded flex flex-row justify-start items-center dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
href=
{
`/u/${user?.id}/rss.xml`
}
target=
"_blank"
>
<
Icon
.
Rss
className=
"w-5 h-auto mr-2 opacity-80"
/>
RSS
</
a
>
</>
</>
)
}
)
}
<
button
<
button
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded
flex flex-row justify-start items-center
dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
onClick=
{
handleAboutBtnClick
}
onClick=
{
handleAboutBtnClick
}
>
>
<
span
className=
"mr-1"
>
🏂
</
span
>
{
t
(
"common.about"
)
}
<
Icon
.
Info
className=
"w-5 h-auto mr-2 opacity-80"
/
>
{
t
(
"common.about"
)
}
</
button
>
</
button
>
{
!
userStore
.
isVisitorMode
()
&&
(
{
!
userStore
.
isVisitorMode
()
&&
(
<
button
<
button
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
className=
"w-full px-3 truncate text-left leading-10 cursor-pointer rounded
flex flex-row justify-start items-center
dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800"
onClick=
{
handleSignOutBtnClick
}
onClick=
{
handleSignOutBtnClick
}
>
>
<
span
className=
"mr-1"
>
👋
</
span
>
{
t
(
"common.sign-out"
)
}
<
Icon
.
LogOut
className=
"w-5 h-auto mr-2 opacity-80"
/
>
{
t
(
"common.sign-out"
)
}
</
button
>
</
button
>
)
}
)
}
</>
</>
...
...
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