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
d1060dbd
Commit
d1060dbd
authored
Jan 07, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Popover in CheckCardModal
parent
829c5bc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
src/reducers/duel/modalSlice.ts
src/reducers/duel/modalSlice.ts
+1
-1
src/service/duel/selectChain.ts
src/service/duel/selectChain.ts
+8
-1
src/ui/Duel/checkCardModal.tsx
src/ui/Duel/checkCardModal.tsx
+22
-13
No files found.
src/reducers/duel/modalSlice.ts
View file @
d1060dbd
...
@@ -135,7 +135,7 @@ export const fetchCheckCardMeta = createAsyncThunk(
...
@@ -135,7 +135,7 @@ export const fetchCheckCardMeta = createAsyncThunk(
code
:
meta
.
id
,
code
:
meta
.
id
,
name
:
meta
.
text
.
name
,
name
:
meta
.
text
.
name
,
desc
:
meta
.
text
.
desc
,
desc
:
meta
.
text
.
desc
,
effectDesc
effectDesc
,
},
},
};
};
...
...
src/service/duel/selectChain.ts
View file @
d1060dbd
...
@@ -2,4 +2,11 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
...
@@ -2,4 +2,11 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import
{
AppDispatch
}
from
"
../../store
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
MsgSelectChain
=
ygopro
.
StocGameMessage
.
MsgSelectChain
;
import
MsgSelectChain
=
ygopro
.
StocGameMessage
.
MsgSelectChain
;
export
default
(
selectChain
:
MsgSelectChain
,
dispatch
:
AppDispatch
)
=>
{};
export
default
(
selectChain
:
MsgSelectChain
,
dispatch
:
AppDispatch
)
=>
{
const
player
=
selectChain
.
player
;
const
spCount
=
selectChain
.
special_count
;
const
forced
=
selectChain
.
forced
;
const
hint0
=
selectChain
.
hint0
;
const
hint1
=
selectChain
.
hint1
;
const
chains
=
selectChain
.
chains
;
};
src/ui/Duel/checkCardModal.tsx
View file @
d1060dbd
...
@@ -10,7 +10,7 @@ import {
...
@@ -10,7 +10,7 @@ import {
resetCheckCardModal
,
resetCheckCardModal
,
setCheckCardModalIsOpen
,
setCheckCardModalIsOpen
,
}
from
"
../../reducers/duel/mod
"
;
}
from
"
../../reducers/duel/mod
"
;
import
{
Modal
,
Button
,
Row
,
Col
}
from
"
antd
"
;
import
{
Modal
,
Button
,
Row
,
Col
,
Popover
}
from
"
antd
"
;
import
{
CheckCard
}
from
"
@ant-design/pro-components
"
;
import
{
CheckCard
}
from
"
@ant-design/pro-components
"
;
import
{
sendSelectCardResponse
}
from
"
../../api/ocgcore/ocgHelper
"
;
import
{
sendSelectCardResponse
}
from
"
../../api/ocgcore/ocgHelper
"
;
...
@@ -57,19 +57,28 @@ const CheckCardModal = () => {
...
@@ -57,19 +57,28 @@ const CheckCardModal = () => {
{
tab
.
options
.
map
((
option
,
idx
)
=>
{
{
tab
.
options
.
map
((
option
,
idx
)
=>
{
return
(
return
(
<
Col
span=
{
4
}
key=
{
idx
}
>
<
Col
span=
{
4
}
key=
{
idx
}
>
<
CheckCard
<
Popover
title=
{
option
.
name
}
content=
{
description=
{
option
.
desc
}
<
div
>
style=
{
{
width
:
120
}
}
<
p
>
{
option
.
name
}
</
p
>
cover=
{
<
p
>
{
option
.
effectDesc
}
</
p
>
<
img
</
div
>
alt=
{
option
.
code
.
toString
()
}
src=
{
`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${option.code}.jpg`
}
style=
{
{
width
:
100
}
}
/>
}
}
value=
{
option
.
response
}
>
/>
<
CheckCard
title=
{
option
.
name
}
description=
{
option
.
desc
}
style=
{
{
width
:
120
}
}
cover=
{
<
img
alt=
{
option
.
code
.
toString
()
}
src=
{
`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${option.code}.jpg`
}
style=
{
{
width
:
100
}
}
/>
}
value=
{
option
.
response
}
/>
</
Popover
>
</
Col
>
</
Col
>
);
);
})
}
})
}
...
...
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