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
d028c48c
Commit
d028c48c
authored
May 14, 2023
by
timel
Committed by
Chunchi Che
May 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: onFieldClick
parent
983baaf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/ui/Duel/NewPlayMat/Card/index.tsx
src/ui/Duel/NewPlayMat/Card/index.tsx
+18
-0
No files found.
src/ui/Duel/NewPlayMat/Card/index.tsx
View file @
d028c48c
...
@@ -101,6 +101,8 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
...
@@ -101,6 +101,8 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
onClick=
{
()
=>
{
onClick=
{
()
=>
{
if
([
MZONE
,
SZONE
,
HAND
].
includes
(
state
.
zone
))
{
if
([
MZONE
,
SZONE
,
HAND
].
includes
(
state
.
zone
))
{
onCardClick
(
state
);
onCardClick
(
state
);
}
else
if
([
EXTRA
,
GRAVE
,
REMOVED
].
includes
(
state
.
zone
))
{
onFieldClick
(
state
);
}
}
}
}
}
}
>
>
...
@@ -154,3 +156,19 @@ const onCardClick = (card: CardType) => {
...
@@ -154,3 +156,19 @@ const onCardClick = (card: CardType) => {
messageStore
.
cardListModal
.
isOpen
=
true
;
messageStore
.
cardListModal
.
isOpen
=
true
;
}
}
};
};
const
onFieldClick
=
(
card
:
CardType
)
=>
()
=>
{
const
displayStates
=
cardStore
.
at
(
card
.
zone
,
card
.
controller
);
messageStore
.
cardListModal
.
list
=
displayStates
.
map
((
item
)
=>
({
meta
:
{
id
:
item
.
code
,
text
:
item
.
text
,
data
:
item
.
data
,
},
interactivies
:
item
.
idleInteractivities
.
map
((
interactivy
)
=>
({
desc
:
interactTypeToString
(
interactivy
.
interactType
),
response
:
interactivy
.
response
,
})),
}));
messageStore
.
cardListModal
.
isOpen
=
true
;
};
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