Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
Neos
Commits
5c785489
Commit
5c785489
authored
Mar 04, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/duel/status' into 'main'
Optimize/duel/status See merge request
!114
parents
561af3a7
8cd0e90d
Pipeline
#20444
passed with stages
in 5 minutes and 20 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
6 deletions
+36
-6
neos.config.json
neos.config.json
+1
-1
src/ui/Duel/layout.tsx
src/ui/Duel/layout.tsx
+3
-3
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+3
-2
src/ui/Duel/status.tsx
src/ui/Duel/status.tsx
+29
-0
No files found.
neos.config.json
View file @
5c785489
...
...
@@ -47,7 +47,7 @@
"height"
:
800
},
"sider"
:
{
"width"
:
4
00
"width"
:
3
00
},
"footer"
:
{
"height"
:
80
...
...
src/ui/Duel/layout.tsx
View file @
5c785489
...
...
@@ -7,10 +7,9 @@ const { Header, Footer, Sider, Content } = Layout;
const
headerStyle
:
React
.
CSSProperties
=
{
textAlign
:
"
center
"
,
alignContent
:
"
center
"
,
color
:
"
#fff
"
,
height
:
layoutConfig
.
header
.
height
,
paddingInline
:
50
,
lineHeight
:
"
64px
"
,
};
const
contentStyle
:
React
.
CSSProperties
=
{
...
...
@@ -18,6 +17,7 @@ const contentStyle: React.CSSProperties = {
minHeight
:
120
,
height
:
layoutConfig
.
content
.
height
,
lineHeight
:
"
120px
"
,
paddingLeft
:
`
${
layoutConfig
.
sider
.
width
}
px`
,
};
const
siderStyle
:
React
.
CSSProperties
=
{
...
...
@@ -42,7 +42,7 @@ const NeosLayout = (props: {
footer
:
React
.
ReactNode
;
})
=>
{
return
(
<
Layout
>
<
Layout
hasSider
>
<
Sider
style=
{
siderStyle
}
width=
{
layoutConfig
.
sider
.
width
}
>
{
props
.
sider
}
</
Sider
>
...
...
src/ui/Duel/main.tsx
View file @
5c785489
...
...
@@ -25,6 +25,7 @@ import NeosConfig from "../../../neos.config.json";
import
DuelTimeLine
from
"
./timeLine
"
;
import
{
Row
}
from
"
antd
"
;
import
SendBox
from
"
./sendBox
"
;
import
PlayerStatus
from
"
./status
"
;
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
...
...
@@ -47,9 +48,9 @@ const NeosDuel = () => {
<>
<
NeosLayout
sider=
{
<
NeosSider
/>
}
header=
{
<
div
>
header
</
div
>
}
header=
{
<
PlayerStatus
/
>
}
content=
{
<
NeosCanvas
/>
}
footer=
{
<
div
>
footer
</
div
>
}
footer=
{
<
PlayerStatus
/
>
}
/>
<
CardModal
/>
<
CardListModal
/>
...
...
src/ui/Duel/status.tsx
0 → 100644
View file @
5c785489
import
React
from
"
react
"
;
import
{
UserOutlined
,
BackwardOutlined
}
from
"
@ant-design/icons
"
;
import
{
Avatar
,
Space
,
Statistic
}
from
"
antd
"
;
const
spaceSize
=
20
;
const
avatarSize
=
40
;
const
PlayerStatus
=
()
=>
(
<
Space
size=
{
spaceSize
}
direction=
"horizontal"
>
<
Space
wrap
size=
{
spaceSize
}
>
<
Avatar
size=
{
avatarSize
}
icon=
{
<
UserOutlined
/>
}
/>
</
Space
>
<
Space
wrap
size=
{
spaceSize
}
>
UserName
</
Space
>
<
Space
wrap
size=
{
spaceSize
}
>
<
Statistic
title=
"Hp"
value=
{
4000
}
/>
</
Space
>
<
Space
wrap
size=
{
spaceSize
}
>
<
Avatar
size=
{
avatarSize
}
style=
{
{
color
:
"
red
"
}
}
icon=
{
<
BackwardOutlined
/>
}
/>
</
Space
>
</
Space
>
);
export
default
PlayerStatus
;
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