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
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
love_飞影
Neos
Commits
364ae7c0
Commit
364ae7c0
authored
Mar 12, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cardModal.tsx
parent
da339efc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
23 deletions
+61
-23
src/ui/Duel/cardModal.tsx
src/ui/Duel/cardModal.tsx
+61
-23
No files found.
src/ui/Duel/cardModal.tsx
View file @
364ae7c0
...
@@ -12,10 +12,11 @@ import {
...
@@ -12,10 +12,11 @@ import {
}
from
"
../../reducers/duel/mod
"
;
}
from
"
../../reducers/duel/mod
"
;
import
{
Modal
,
Card
,
Button
,
Row
,
Col
}
from
"
antd
"
;
import
{
Modal
,
Card
,
Button
,
Row
,
Col
}
from
"
antd
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
../../api/ocgcore/ocgHelper
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
../../api/ocgcore/ocgHelper
"
;
import
Icon
from
"
@ant-design/icons
"
;
import
Icon
,
{
StarOutlined
}
from
"
@ant-design/icons
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../neos-assets/battle-axe.svg
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../neos-assets/battle-axe.svg
"
;
import
{
ReactComponent
as
DefenceSvg
}
from
"
../../../neos-assets/checked-shield.svg
"
;
import
{
ReactComponent
as
DefenceSvg
}
from
"
../../../neos-assets/checked-shield.svg
"
;
import
{
Meta2StringCodeMap
}
from
"
../../common
"
;
const
{
Meta
}
=
Card
;
const
{
Meta
}
=
Card
;
const
CARD_WIDTH
=
240
;
const
CARD_WIDTH
=
240
;
...
@@ -25,6 +26,10 @@ const CardModal = () => {
...
@@ -25,6 +26,10 @@ const CardModal = () => {
const
isOpen
=
useAppSelector
(
selectCardModalIsOpen
);
const
isOpen
=
useAppSelector
(
selectCardModalIsOpen
);
const
meta
=
useAppSelector
(
selectCardModalMeta
);
const
meta
=
useAppSelector
(
selectCardModalMeta
);
const
name
=
meta
?.
text
.
name
;
const
name
=
meta
?.
text
.
name
;
const
types
=
meta
?.
text
.
types
;
const
race
=
meta
?.
data
.
race
;
const
attribute
=
meta
?.
data
.
attribute
;
const
level
=
meta
?.
data
.
level
;
const
desc
=
meta
?.
text
.
desc
;
const
desc
=
meta
?.
text
.
desc
;
const
atk
=
meta
?.
data
.
atk
;
const
atk
=
meta
?.
data
.
atk
;
const
def
=
meta
?.
data
.
def
;
const
def
=
meta
?.
data
.
def
;
...
@@ -45,30 +50,13 @@ const CardModal = () => {
...
@@ -45,30 +50,13 @@ const CardModal = () => {
cover=
{
<
img
alt=
{
name
}
src=
{
imgUrl
}
/>
}
cover=
{
<
img
alt=
{
name
}
src=
{
imgUrl
}
/>
}
>
>
<
Meta
title=
{
name
}
/>
<
Meta
title=
{
name
}
/>
<
p
>
{
desc
}
</
p
>
<
p
>
<
p
>
<
Row
gutter=
{
8
}
>
<
AtkLine
level=
{
level
}
atk=
{
atk
}
def=
{
def
}
/>
{
atk
?
(
</
p
>
<
Col
>
<
p
>
<
Icon
component=
{
BattleSvg
}
/>
<
AttLine
types=
{
types
}
race=
{
race
}
attribute=
{
attribute
}
/>
<
a
>
{
atk
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
<
Col
>
<
div
>
/
</
div
>
</
Col
>
{
def
?
(
<
Col
>
<
Icon
component=
{
DefenceSvg
}
/>
<
a
>
{
def
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
</
Row
>
</
p
>
</
p
>
<
p
>
{
desc
}
</
p
>
</
Card
>
</
Card
>
{
interactivies
.
map
((
interactive
,
idx
)
=>
{
{
interactivies
.
map
((
interactive
,
idx
)
=>
{
return
(
return
(
...
@@ -89,4 +77,54 @@ const CardModal = () => {
...
@@ -89,4 +77,54 @@ const CardModal = () => {
);
);
};
};
const
AtkLine
=
(
props
:
{
level
?:
number
;
atk
?:
number
;
def
?:
number
})
=>
(
<
Row
gutter=
{
8
}
>
{
props
.
level
?
(
<
Col
>
<
StarOutlined
/>
{
props
.
level
}
</
Col
>
)
:
(
<></>
)
}
{
props
.
atk
?
(
<
Col
>
<
Icon
component=
{
BattleSvg
}
/>
<
a
>
{
props
.
atk
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
<
Col
>
<
div
>
/
</
div
>
</
Col
>
{
props
.
def
?
(
<
Col
>
<
Icon
component=
{
DefenceSvg
}
/>
<
a
>
{
props
.
def
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
</
Row
>
);
const
AttLine
=
(
props
:
{
types
?:
string
;
race
?:
number
;
attribute
?:
number
;
})
=>
(
<
Row
gutter=
{
8
}
>
{
props
.
types
?
<
Col
>
{
`[${props.types}]`
}
</
Col
>
:
<></>
}
{
props
.
race
?
<
Col
>
{
Meta2StringCodeMap
.
get
(
props
.
race
)
}
</
Col
>
:
<></>
}
<
Col
>
<
div
>
/
</
div
>
</
Col
>
{
props
.
attribute
?
(
<
Col
>
{
Meta2StringCodeMap
.
get
(
props
.
attribute
)
}
</
Col
>
)
:
(
<></>
)
}
</
Row
>
);
export
default
CardModal
;
export
default
CardModal
;
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