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
73baeaa0
Commit
73baeaa0
authored
Jan 04, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak dark mode styles
parent
c58851bc
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
47 additions
and
67 deletions
+47
-67
HomeSidebarDrawer.tsx
web/src/components/HomeSidebarDrawer.tsx
+1
-1
MemoCommentMessage.tsx
web/src/components/Inbox/MemoCommentMessage.tsx
+2
-2
VersionUpdateMessage.tsx
web/src/components/Inbox/VersionUpdateMessage.tsx
+2
-2
MobileHeader.tsx
web/src/components/MobileHeader.tsx
+3
-3
Navigation.tsx
web/src/components/Navigation.tsx
+15
-9
NavigationDrawer.tsx
web/src/components/NavigationDrawer.tsx
+2
-2
PersonalStatistics.tsx
web/src/components/PersonalStatistics.tsx
+1
-1
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+2
-2
SSOSection.tsx
web/src/components/Settings/SSOSection.tsx
+7
-12
StorageSection.tsx
web/src/components/Settings/StorageSection.tsx
+2
-4
WebhookSection.tsx
web/src/components/Settings/WebhookSection.tsx
+2
-2
UserBanner.tsx
web/src/components/UserBanner.tsx
+1
-25
Root.tsx
web/src/layouts/Root.tsx
+1
-1
UserProfile.tsx
web/src/pages/UserProfile.tsx
+6
-1
No files found.
web/src/components/HomeSidebarDrawer.tsx
View file @
73baeaa0
...
@@ -23,7 +23,7 @@ const HomeSidebarDrawer = () => {
...
@@ -23,7 +23,7 @@ const HomeSidebarDrawer = () => {
return
(
return
(
<>
<>
<
IconButton
onClick=
{
toggleDrawer
(
true
)
}
>
<
IconButton
onClick=
{
toggleDrawer
(
true
)
}
>
<
Icon
.
Search
className=
"w-5 h-auto dark:text-gray-
2
00"
/>
<
Icon
.
Search
className=
"w-5 h-auto dark:text-gray-
4
00"
/>
</
IconButton
>
</
IconButton
>
<
Drawer
anchor=
"right"
size=
"sm"
open=
{
open
}
onClose=
{
toggleDrawer
(
false
)
}
>
<
Drawer
anchor=
"right"
size=
"sm"
open=
{
open
}
onClose=
{
toggleDrawer
(
false
)
}
>
<
div
className=
"w-full px-1"
>
<
div
className=
"w-full px-1"
>
...
...
web/src/components/Inbox/MemoCommentMessage.tsx
View file @
73baeaa0
...
@@ -64,7 +64,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
...
@@ -64,7 +64,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
"shrink-0 mt-2 p-2 rounded-full border",
"shrink-0 mt-2 p-2 rounded-full border",
inbox.status === Inbox_Status.UNREAD
inbox.status === Inbox_Status.UNREAD
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
: "border-gray-
400 text-gray-4
00 bg-gray-50 dark:bg-zinc-800"
: "border-gray-
500 text-gray-5
00 bg-gray-50 dark:bg-zinc-800"
)}
)}
>
>
<Tooltip title={"Comment"} placement="bottom">
<Tooltip title={"Comment"} placement="bottom">
...
@@ -73,7 +73,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
...
@@ -73,7 +73,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
</div>
</div>
<div
<div
className={classNames(
className={classNames(
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-
800 hover:bg-gray-100 dark:hover:bg-zinc-8
00",
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-
700 hover:bg-gray-100 dark:hover:bg-zinc-7
00",
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
)}
)}
>
>
...
...
web/src/components/Inbox/VersionUpdateMessage.tsx
View file @
73baeaa0
...
@@ -63,7 +63,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
...
@@ -63,7 +63,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
"shrink-0 mt-2 p-2 rounded-full border",
"shrink-0 mt-2 p-2 rounded-full border",
inbox.status === Inbox_Status.UNREAD
inbox.status === Inbox_Status.UNREAD
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
: "border-gray-
400 text-gray-4
00 bg-gray-50 dark:bg-zinc-800"
: "border-gray-
500 text-gray-5
00 bg-gray-50 dark:bg-zinc-800"
)}
)}
>
>
<Tooltip title={"Update"} placement="bottom">
<Tooltip title={"Update"} placement="bottom">
...
@@ -72,7 +72,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
...
@@ -72,7 +72,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
</div>
</div>
<div
<div
className={classNames(
className={classNames(
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-
800 hover:bg-gray-100 dark:hover:bg-zinc-8
00",
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-
700 hover:bg-gray-100 dark:hover:bg-zinc-7
00",
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
)}
)}
>
>
...
...
web/src/components/MobileHeader.tsx
View file @
73baeaa0
...
@@ -11,7 +11,7 @@ interface Props {
...
@@ -11,7 +11,7 @@ interface Props {
const
MobileHeader
=
(
props
:
Props
)
=>
{
const
MobileHeader
=
(
props
:
Props
)
=>
{
const
{
children
}
=
props
;
const
{
children
}
=
props
;
const
{
sm
}
=
useResponsiveWidth
();
const
{
sm
}
=
useResponsiveWidth
();
const
[
titleText
]
=
useState
(
"M
EMOS
"
);
const
[
titleText
]
=
useState
(
"M
emos
"
);
const
{
y
:
offsetTop
}
=
useWindowScroll
();
const
{
y
:
offsetTop
}
=
useWindowScroll
();
return
(
return
(
...
@@ -24,8 +24,8 @@ const MobileHeader = (props: Props) => {
...
@@ -24,8 +24,8 @@ const MobileHeader = (props: Props) => {
<
div
className=
"flex flex-row justify-start items-center mr-2 shrink-0 overflow-hidden"
>
<
div
className=
"flex flex-row justify-start items-center mr-2 shrink-0 overflow-hidden"
>
{
!
sm
&&
<
NavigationDrawer
/>
}
{
!
sm
&&
<
NavigationDrawer
/>
}
<
span
<
span
className=
"font-bold text-lg leading-10 mr-1 text-ellipsis shrink-0 cursor-pointer overflow-hidden text-gray-700 dark:text-gray-
2
00"
className=
"font-bold text-lg leading-10 mr-1 text-ellipsis shrink-0 cursor-pointer overflow-hidden text-gray-700 dark:text-gray-
3
00"
onClick=
{
()
=>
location
.
reload
()
}
on
Double
Click=
{
()
=>
location
.
reload
()
}
>
>
{
titleText
}
{
titleText
}
</
span
>
</
span
>
...
...
web/src/components/Navigation.tsx
View file @
73baeaa0
...
@@ -55,6 +55,18 @@ const Navigation = () => {
...
@@ -55,6 +55,18 @@ const Navigation = () => {
title
:
t
(
"common.resources"
),
title
:
t
(
"common.resources"
),
icon
:
<
Icon
.
Paperclip
className=
"mr-3 w-6 h-auto opacity-70"
/>,
icon
:
<
Icon
.
Paperclip
className=
"mr-3 w-6 h-auto opacity-70"
/>,
};
};
const
exploreNavLink
:
NavLinkItem
=
{
id
:
"header-explore"
,
path
:
"/explore"
,
title
:
t
(
"common.explore"
),
icon
:
<
Icon
.
Globe2
className=
"mr-3 w-6 h-auto opacity-70"
/>,
};
const
profileNavLink
:
NavLinkItem
=
{
id
:
"header-profile"
,
path
:
user
?
`/u/
${
encodeURIComponent
(
user
.
username
)}
`
:
""
,
title
:
t
(
"common.profile"
),
icon
:
<
Icon
.
User2
className=
"mr-3 w-6 h-auto opacity-70"
/>,
};
const
inboxNavLink
:
NavLinkItem
=
{
const
inboxNavLink
:
NavLinkItem
=
{
id
:
"header-inbox"
,
id
:
"header-inbox"
,
path
:
"/inbox"
,
path
:
"/inbox"
,
...
@@ -68,12 +80,6 @@ const Navigation = () => {
...
@@ -68,12 +80,6 @@ const Navigation = () => {
</>
</>
),
),
};
};
const
exploreNavLink
:
NavLinkItem
=
{
id
:
"header-explore"
,
path
:
"/explore"
,
title
:
t
(
"common.explore"
),
icon
:
<
Icon
.
Globe2
className=
"mr-3 w-6 h-auto opacity-70"
/>,
};
const
archivedNavLink
:
NavLinkItem
=
{
const
archivedNavLink
:
NavLinkItem
=
{
id
:
"header-archived"
,
id
:
"header-archived"
,
path
:
"/archived"
,
path
:
"/archived"
,
...
@@ -94,7 +100,7 @@ const Navigation = () => {
...
@@ -94,7 +100,7 @@ const Navigation = () => {
};
};
const
navLinks
:
NavLinkItem
[]
=
user
const
navLinks
:
NavLinkItem
[]
=
user
?
[
homeNavLink
,
timelineNavLink
,
resourcesNavLink
,
exploreNavLink
,
inboxNavLink
,
archivedNavLink
,
settingNavLink
]
?
[
homeNavLink
,
timelineNavLink
,
resourcesNavLink
,
exploreNavLink
,
profileNavLink
,
inboxNavLink
,
archivedNavLink
,
settingNavLink
]
:
[
exploreNavLink
,
signInNavLink
];
:
[
exploreNavLink
,
signInNavLink
];
return
(
return
(
...
@@ -105,8 +111,8 @@ const Navigation = () => {
...
@@ -105,8 +111,8 @@ const Navigation = () => {
<
NavLink
<
NavLink
className=
{
({
isActive
})
=>
className=
{
({
isActive
})
=>
classNames
(
classNames
(
"w-full px-4 pr-5 py-2 rounded-2xl border flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:border-gray-200 dark:hover:border-zinc-
600 dark:hover:bg-zinc-7
00"
,
"w-full px-4 pr-5 py-2 rounded-2xl border flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:border-gray-200 dark:hover:border-zinc-
700 dark:hover:bg-zinc-8
00"
,
isActive
?
"bg-white drop-shadow-sm dark:bg-zinc-
700 border-gray-200 dark:border-zinc-6
00"
:
"border-transparent"
isActive
?
"bg-white drop-shadow-sm dark:bg-zinc-
800 border-gray-200 dark:border-zinc-7
00"
:
"border-transparent"
)
)
}
}
key=
{
navLink
.
id
}
key=
{
navLink
.
id
}
...
...
web/src/components/NavigationDrawer.tsx
View file @
73baeaa0
...
@@ -23,10 +23,10 @@ const NavigationDrawer = () => {
...
@@ -23,10 +23,10 @@ const NavigationDrawer = () => {
return
(
return
(
<>
<>
<
IconButton
onClick=
{
toggleDrawer
(
true
)
}
>
<
IconButton
onClick=
{
toggleDrawer
(
true
)
}
>
<
Icon
.
Menu
className=
"w-5 h-auto dark:text-gray-
2
00"
/>
<
Icon
.
Menu
className=
"w-5 h-auto dark:text-gray-
4
00"
/>
</
IconButton
>
</
IconButton
>
<
Drawer
anchor=
"left"
size=
"sm"
open=
{
open
}
onClose=
{
toggleDrawer
(
false
)
}
>
<
Drawer
anchor=
"left"
size=
"sm"
open=
{
open
}
onClose=
{
toggleDrawer
(
false
)
}
>
<
div
className=
"w-full h-full px-4
bg-zinc-100 dark:bg-zinc-800
"
>
<
div
className=
"w-full h-full px-4"
>
<
Navigation
/>
<
Navigation
/>
</
div
>
</
div
>
</
Drawer
>
</
Drawer
>
...
...
web/src/components/PersonalStatistics.tsx
View file @
73baeaa0
...
@@ -46,7 +46,7 @@ const PersonalStatistics = (props: Props) => {
...
@@ -46,7 +46,7 @@ const PersonalStatistics = (props: Props) => {
</
div
>
</
div
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
Icon
.
PencilLine
className=
"w-4 h-auto mr-1"
/>
<
Icon
.
Library
className=
"w-4 h-auto mr-1"
/>
<
span
className=
"block text-base sm:text-sm"
>
Memos
</
span
>
<
span
className=
"block text-base sm:text-sm"
>
Memos
</
span
>
</
div
>
</
div
>
{
isRequesting
?
<
Icon
.
Loader
className=
"animate-spin w-4 h-auto text-gray-400"
/>
:
<
span
className=
"font-mono"
>
{
memoAmount
}
</
span
>
}
{
isRequesting
?
<
Icon
.
Loader
className=
"animate-spin w-4 h-auto text-gray-400"
/>
:
<
span
className=
"font-mono"
>
{
memoAmount
}
</
span
>
}
...
...
web/src/components/Settings/MemberSection.tsx
View file @
73baeaa0
...
@@ -140,8 +140,8 @@ const MemberSection = () => {
...
@@ -140,8 +140,8 @@ const MemberSection = () => {
<
div
className=
"title-text"
>
{
t
(
"setting.member-list"
)
}
</
div
>
<
div
className=
"title-text"
>
{
t
(
"setting.member-list"
)
}
</
div
>
</
div
>
</
div
>
<
div
className=
"w-full overflow-x-auto"
>
<
div
className=
"w-full overflow-x-auto"
>
<
div
className=
"inline-block min-w-full align-middle"
>
<
div
className=
"inline-block min-w-full align-middle
border rounded-lg dark:border-gray-500
"
>
<
table
className=
"min-w-full divide-y divide-gray-300 dark:divide-gray-
4
00"
>
<
table
className=
"min-w-full divide-y divide-gray-300 dark:divide-gray-
5
00"
>
<
thead
>
<
thead
>
<
tr
className=
"text-sm font-semibold text-left text-gray-900 dark:text-gray-300"
>
<
tr
className=
"text-sm font-semibold text-left text-gray-900 dark:text-gray-300"
>
<
th
scope=
"col"
className=
"py-2 pl-4 pr-3"
>
<
th
scope=
"col"
className=
"py-2 pl-4 pr-3"
>
...
...
web/src/components/Settings/SSOSection.tsx
View file @
73baeaa0
import
{
Divider
,
List
,
ListItem
}
from
"@mui/joy"
;
import
{
Button
,
Divider
,
List
,
ListItem
}
from
"@mui/joy"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
Link
}
from
"react-router-dom"
;
...
@@ -58,19 +58,14 @@ const SSOSection = () => {
...
@@ -58,19 +58,14 @@ const SSOSection = () => {
return
(
return
(
<
div
className=
"section-container"
>
<
div
className=
"section-container"
>
<
div
className=
"mb-2 w-full flex flex-row justify-start items-center gap-1"
>
<
div
className=
"mb-2 w-full flex flex-row justify-between items-center gap-1"
>
<
div
className=
"flex flex-row items-center gap-1"
>
<
span
className=
"font-mono text-sm text-gray-400"
>
{
t
(
"setting.sso-section.sso-list"
)
}
</
span
>
<
span
className=
"font-mono text-sm text-gray-400"
>
{
t
(
"setting.sso-section.sso-list"
)
}
</
span
>
<
LearnMore
url=
"https://usememos.com/docs/advanced-settings/keycloak"
/>
<
LearnMore
url=
"https://usememos.com/docs/advanced-settings/keycloak"
/>
<
button
className=
"btn-normal px-2 py-0 ml-1"
onClick=
{
()
=>
showCreateIdentityProviderDialog
(
undefined
,
fetchIdentityProviderList
)
}
>
{
t
(
"common.create"
)
}
</
button
>
</
div
>
</
div
>
<
Button
onClick=
{
()
=>
showCreateIdentityProviderDialog
(
undefined
,
fetchIdentityProviderList
)
}
>
{
t
(
"common.create"
)
}
</
Button
>
</
div
>
<
Divider
/>
<
Divider
/>
{
identityProviderList
.
map
((
identityProvider
)
=>
(
{
identityProviderList
.
map
((
identityProvider
)
=>
(
<
div
<
div
key=
{
identityProvider
.
id
}
key=
{
identityProvider
.
id
}
...
...
web/src/components/Settings/StorageSection.tsx
View file @
73baeaa0
import
{
Divider
,
IconButton
,
List
,
ListItem
,
Radio
,
RadioGroup
}
from
"@mui/joy"
;
import
{
Button
,
Divider
,
IconButton
,
List
,
ListItem
,
Radio
,
RadioGroup
}
from
"@mui/joy"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
Link
}
from
"react-router-dom"
;
...
@@ -88,9 +88,7 @@ const StorageSection = () => {
...
@@ -88,9 +88,7 @@ const StorageSection = () => {
<
span
className=
"font-mono text-sm text-gray-400"
>
{
t
(
"setting.storage-section.storage-services"
)
}
</
span
>
<
span
className=
"font-mono text-sm text-gray-400"
>
{
t
(
"setting.storage-section.storage-services"
)
}
</
span
>
<
LearnMore
url=
"https://usememos.com/docs/advanced-settings/cloudflare-r2"
/>
<
LearnMore
url=
"https://usememos.com/docs/advanced-settings/cloudflare-r2"
/>
</
div
>
</
div
>
<
button
className=
"btn-normal px-2 py-0 ml-1"
onClick=
{
()
=>
showCreateStorageServiceDialog
(
undefined
,
fetchStorageList
)
}
>
<
Button
onClick=
{
()
=>
showCreateStorageServiceDialog
(
undefined
,
fetchStorageList
)
}
>
{
t
(
"common.create"
)
}
</
Button
>
{
t
(
"common.create"
)
}
</
button
>
</
div
>
</
div
>
<
div
className=
"mt-2 w-full flex flex-col"
>
<
div
className=
"mt-2 w-full flex flex-col"
>
{
storageList
.
map
((
storage
)
=>
(
{
storageList
.
map
((
storage
)
=>
(
...
...
web/src/components/Settings/WebhookSection.tsx
View file @
73baeaa0
...
@@ -65,8 +65,8 @@ const WebhookSection = () => {
...
@@ -65,8 +65,8 @@ const WebhookSection = () => {
</
div
>
</
div
>
<
div
className=
"w-full mt-2 flow-root"
>
<
div
className=
"w-full mt-2 flow-root"
>
<
div
className=
"overflow-x-auto"
>
<
div
className=
"overflow-x-auto"
>
<
div
className=
"inline-block min-w-full border rounded-lg align-middle"
>
<
div
className=
"inline-block min-w-full border rounded-lg align-middle
dark:border-gray-500
"
>
<
table
className=
"min-w-full divide-y divide-gray-300 dark:divide-gray-
4
00"
>
<
table
className=
"min-w-full divide-y divide-gray-300 dark:divide-gray-
5
00"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
<
th
scope=
"col"
className=
"px-3 py-2 text-left text-sm font-semibold text-gray-900 dark:text-gray-400"
>
<
th
scope=
"col"
className=
"px-3 py-2 text-left text-sm font-semibold text-gray-900 dark:text-gray-400"
>
...
...
web/src/components/UserBanner.tsx
View file @
73baeaa0
import
*
as
api
from
"@/helpers/api"
;
import
*
as
api
from
"@/helpers/api"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useNavigateTo
from
"@/hooks/useNavigateTo"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
showAboutSiteDialog
from
"./AboutSiteDialog"
;
import
showAboutSiteDialog
from
"./AboutSiteDialog"
;
...
@@ -10,30 +9,24 @@ import Dropdown from "./kit/Dropdown";
...
@@ -10,30 +9,24 @@ import Dropdown from "./kit/Dropdown";
const
UserBanner
=
()
=>
{
const
UserBanner
=
()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
navigateTo
=
useNavigateTo
();
const
globalStore
=
useGlobalStore
();
const
globalStore
=
useGlobalStore
();
const
{
systemStatus
}
=
globalStore
.
state
;
const
{
systemStatus
}
=
globalStore
.
state
;
const
user
=
useCurrentUser
();
const
user
=
useCurrentUser
();
const
title
=
user
?
user
.
nickname
||
user
.
username
:
systemStatus
.
customizedProfile
.
name
||
"memos"
;
const
title
=
user
?
user
.
nickname
||
user
.
username
:
systemStatus
.
customizedProfile
.
name
||
"memos"
;
const
handleMyAccountClick
=
()
=>
{
navigateTo
(
`/u/
${
encodeURIComponent
(
user
.
username
)}
`
);
};
const
handleAboutBtnClick
=
()
=>
{
const
handleAboutBtnClick
=
()
=>
{
showAboutSiteDialog
();
showAboutSiteDialog
();
};
};
const
handleSignOutBtnClick
=
async
()
=>
{
const
handleSignOutBtnClick
=
async
()
=>
{
await
api
.
signout
();
await
api
.
signout
();
localStorage
.
removeItem
(
"userId"
);
window
.
location
.
href
=
"/auth"
;
window
.
location
.
href
=
"/auth"
;
};
};
return
(
return
(
<
div
className=
"relative w-full h-auto px-1 shrink-0"
>
<
div
className=
"relative w-full h-auto px-1 shrink-0"
>
<
Dropdown
<
Dropdown
className=
"w-auto"
className=
"w-auto
inline-flex
"
trigger=
{
trigger=
{
<
div
className=
"px-3 py-2 max-w-full flex flex-row justify-start items-center cursor-pointer rounded-2xl hover:shadow hover:bg-white dark:hover:bg-zinc-700"
>
<
div
className=
"px-3 py-2 max-w-full flex flex-row justify-start items-center cursor-pointer rounded-2xl hover:shadow hover:bg-white dark:hover:bg-zinc-700"
>
<
UserAvatar
className=
"shadow shrink-0 mr-2"
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
UserAvatar
className=
"shadow shrink-0 mr-2"
avatarUrl=
{
user
?.
avatarUrl
}
/>
...
@@ -44,23 +37,6 @@ const UserBanner = () => {
...
@@ -44,23 +37,6 @@ const UserBanner = () => {
positionClassName=
"top-full mt-2"
positionClassName=
"top-full mt-2"
actions=
{
actions=
{
<>
<>
{
user
!=
undefined
&&
(
<>
<
button
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
}
>
<
Icon
.
User
className=
"w-5 h-auto mr-2 opacity-80"
/>
{
t
(
"common.profile"
)
}
</
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 flex flex-row justify-start items-center 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
}
...
...
web/src/layouts/Root.tsx
View file @
73baeaa0
...
@@ -11,7 +11,7 @@ function Root() {
...
@@ -11,7 +11,7 @@ function Root() {
<
div
className=
"w-full min-h-full"
>
<
div
className=
"w-full min-h-full"
>
<
div
className=
"w-full sm:pl-56 md:pl-64 mx-auto flex flex-row justify-center items-start"
>
<
div
className=
"w-full sm:pl-56 md:pl-64 mx-auto flex flex-row justify-center items-start"
>
{
sm
&&
(
{
sm
&&
(
<
div
className=
"hidden sm:block fixed top-0 left-0 w-56 md:w-64 px-4 border-r dark:border-zinc-800 h-full bg-zinc-50 dark:bg-zinc-800 dark:bg-opacity-
6
0 transition-all hover:shadow-xl z-2"
>
<
div
className=
"hidden sm:block fixed top-0 left-0 w-56 md:w-64 px-4 border-r dark:border-zinc-800 h-full bg-zinc-50 dark:bg-zinc-800 dark:bg-opacity-
4
0 transition-all hover:shadow-xl z-2"
>
<
Navigation
/>
<
Navigation
/>
</
div
>
</
div
>
)
}
)
}
...
...
web/src/pages/UserProfile.tsx
View file @
73baeaa0
...
@@ -93,7 +93,12 @@ const UserProfile = () => {
...
@@ -93,7 +93,12 @@ const UserProfile = () => {
<>
<>
<
div
className=
"w-full flex flex-col justify-start items-center py-8"
>
<
div
className=
"w-full flex flex-col justify-start items-center py-8"
>
<
UserAvatar
className=
"!w-20 !h-20 mb-2 drop-shadow"
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
UserAvatar
className=
"!w-20 !h-20 mb-2 drop-shadow"
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
p
className=
"text-3xl text-black opacity-80 dark:text-gray-200"
>
{
user
?.
nickname
}
</
p
>
<
div
className=
"w-full flex flex-row justify-center items-center"
>
<
p
className=
"text-3xl text-black leading-none opacity-80 dark:text-gray-200"
>
{
user
?.
nickname
}
</
p
>
<
a
className=
"ml-1 cursor-pointer text-gray-500"
href=
{
`/u/${user?.id}/rss.xml`
}
target=
"_blank"
>
<
Icon
.
Rss
className=
"w-5 h-auto opacity-60 mt-0.5"
/>
</
a
>
</
div
>
</
div
>
</
div
>
{
sortedMemos
.
map
((
memo
)
=>
(
{
sortedMemos
.
map
((
memo
)
=>
(
<
MemoView
key=
{
memo
.
id
}
memo=
{
memo
}
showVisibility
showPinnedStyle
showParent
/>
<
MemoView
key=
{
memo
.
id
}
memo=
{
memo
}
showVisibility
showPinnedStyle
showParent
/>
...
...
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