Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Accounts Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Moecube Accounts Web
Commits
3643a39e
Commit
3643a39e
authored
Aug 23, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use cut images for corner avatar
parent
548f4d87
Pipeline
#16012
passed with stages
in 2 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4537 additions
and
2258 deletions
+4537
-2258
src/components/UserPanel.js
src/components/UserPanel.js
+9
-1
yarn.lock
yarn.lock
+4528
-2257
No files found.
src/components/UserPanel.js
View file @
3643a39e
...
@@ -7,8 +7,16 @@ import Format from '../components/Format'
...
@@ -7,8 +7,16 @@ import Format from '../components/Format'
const
defaultAvatar
=
require
(
'
../../public/default_avatar.jpg
'
);
const
defaultAvatar
=
require
(
'
../../public/default_avatar.jpg
'
);
function
mutatedUserAvatar
(
avatar
)
{
if
(
!
avatar
)
{
return
avatar
;
}
return
`https://sapi.moecube.com:444/avatar/url/
${
avatar
.
split
(
'
/
'
).
pop
()}
/40/avatar.png`
;
}
function
UserPanel
({
dispatch
,
user
})
{
function
UserPanel
({
dispatch
,
user
})
{
const
{
avatar
}
=
user
;
const
{
avatar
}
=
user
;
const
mutatedAvatar
=
mutatedUserAvatar
(
avatar
);
const
menu
=
(
const
menu
=
(
<
Menu
trigger
=
{[
'
click
'
]}
>
<
Menu
trigger
=
{[
'
click
'
]}
>
<
Menu
.
Item
>
<
Menu
.
Item
>
...
@@ -46,7 +54,7 @@ function UserPanel({ dispatch, user }) {
...
@@ -46,7 +54,7 @@ function UserPanel({ dispatch, user }) {
<Dropdown overlay={menu} placement=
"
bottomCenter
"
>
<Dropdown overlay={menu} placement=
"
bottomCenter
"
>
<div className=
"
ant
-
dropdown
-
link
"
style={{ display: 'flex', alignItems: 'center' }}>
<div className=
"
ant
-
dropdown
-
link
"
style={{ display: 'flex', alignItems: 'center' }}>
<img
<img
alt=
"
avatar
"
src={
a
vatar || defaultAvatar}
alt=
"
avatar
"
src={
mutatedA
vatar || defaultAvatar}
style={{ borderRadius: '45px',
style={{ borderRadius: '45px',
height: '40px',
height: '40px',
weight: '40px',
weight: '40px',
...
...
yarn.lock
View file @
3643a39e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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