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
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
Pipeline
#20599
passed with stages
in 7 minutes and 4 seconds
Changes
1
Pipelines
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 {
}
from
"
../../reducers/duel/mod
"
;
import
{
Modal
,
Card
,
Button
,
Row
,
Col
}
from
"
antd
"
;
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
{
ReactComponent
as
BattleSvg
}
from
"
../../../neos-assets/battle-axe.svg
"
;
import
{
ReactComponent
as
DefenceSvg
}
from
"
../../../neos-assets/checked-shield.svg
"
;
import
{
Meta2StringCodeMap
}
from
"
../../common
"
;
const
{
Meta
}
=
Card
;
const
CARD_WIDTH
=
240
;
...
...
@@ -25,6 +26,10 @@ const CardModal = () => {
const
isOpen
=
useAppSelector
(
selectCardModalIsOpen
);
const
meta
=
useAppSelector
(
selectCardModalMeta
);
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
atk
=
meta
?.
data
.
atk
;
const
def
=
meta
?.
data
.
def
;
...
...
@@ -45,30 +50,13 @@ const CardModal = () => {
cover=
{
<
img
alt=
{
name
}
src=
{
imgUrl
}
/>
}
>
<
Meta
title=
{
name
}
/>
<
p
>
{
desc
}
</
p
>
<
p
>
<
Row
gutter=
{
8
}
>
{
atk
?
(
<
Col
>
<
Icon
component=
{
BattleSvg
}
/>
<
a
>
{
atk
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
<
Col
>
<
div
>
/
</
div
>
</
Col
>
{
def
?
(
<
Col
>
<
Icon
component=
{
DefenceSvg
}
/>
<
a
>
{
def
}
</
a
>
</
Col
>
)
:
(
<></>
)
}
</
Row
>
<
AtkLine
level=
{
level
}
atk=
{
atk
}
def=
{
def
}
/>
</
p
>
<
p
>
<
AttLine
types=
{
types
}
race=
{
race
}
attribute=
{
attribute
}
/>
</
p
>
<
p
>
{
desc
}
</
p
>
</
Card
>
{
interactivies
.
map
((
interactive
,
idx
)
=>
{
return
(
...
...
@@ -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
;
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