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
ac5439ab
Commit
ac5439ab
authored
Apr 02, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize hint
parent
9f376563
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
src/ui/Duel/checkCardModal.tsx
src/ui/Duel/checkCardModal.tsx
+3
-1
src/ui/Duel/checkCardModalV2.tsx
src/ui/Duel/checkCardModalV2.tsx
+3
-1
src/ui/Duel/checkCardModalV3.tsx
src/ui/Duel/checkCardModalV3.tsx
+3
-1
No files found.
src/ui/Duel/checkCardModal.tsx
View file @
ac5439ab
...
@@ -22,6 +22,7 @@ import {
...
@@ -22,6 +22,7 @@ import {
import
{
ThunderboltOutlined
}
from
"
@ant-design/icons
"
;
import
{
ThunderboltOutlined
}
from
"
@ant-design/icons
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectMeHint
}
from
"
../../reducers/duel/hintSlice
"
;
const
CheckCardModal
=
()
=>
{
const
CheckCardModal
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
const
dispatch
=
store
.
dispatch
;
...
@@ -33,6 +34,7 @@ const CheckCardModal = () => {
...
@@ -33,6 +34,7 @@ const CheckCardModal = () => {
const
cancelResponse
=
useAppSelector
(
selectCheckCardModalCacnelResponse
);
const
cancelResponse
=
useAppSelector
(
selectCheckCardModalCacnelResponse
);
const
[
response
,
setResponse
]
=
useState
<
number
[]
>
([]);
const
[
response
,
setResponse
]
=
useState
<
number
[]
>
([]);
const
defaultValue
:
number
[]
=
[];
const
defaultValue
:
number
[]
=
[];
const
selectHint
=
useAppSelector
(
selectMeHint
)?.
esSelectHint
||
"
请选择卡片
"
;
// TODO: 这里可以考虑更好地封装
// TODO: 这里可以考虑更好地封装
const
sendResponseHandler
=
(
const
sendResponseHandler
=
(
...
@@ -55,7 +57,7 @@ const CheckCardModal = () => {
...
@@ -55,7 +57,7 @@ const CheckCardModal = () => {
return
(
return
(
<
DragModal
<
DragModal
title=
{
`
请选择${min}到${max}张卡片
`
}
title=
{
`
${selectHint} ${min}-${max}
`
}
open=
{
isOpen
}
open=
{
isOpen
}
closable=
{
false
}
closable=
{
false
}
footer=
{
footer=
{
...
...
src/ui/Duel/checkCardModalV2.tsx
View file @
ac5439ab
...
@@ -20,6 +20,7 @@ import {
...
@@ -20,6 +20,7 @@ import {
}
from
"
../../reducers/duel/mod
"
;
}
from
"
../../reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectMeHint
}
from
"
../../reducers/duel/hintSlice
"
;
const
CheckCardModalV2
=
()
=>
{
const
CheckCardModalV2
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
const
dispatch
=
store
.
dispatch
;
...
@@ -32,6 +33,7 @@ const CheckCardModalV2 = () => {
...
@@ -32,6 +33,7 @@ const CheckCardModalV2 = () => {
);
);
const
selectedOptions
=
useAppSelector
(
selectCheckCardModalV2SelectedOptions
);
const
selectedOptions
=
useAppSelector
(
selectCheckCardModalV2SelectedOptions
);
const
responseable
=
useAppSelector
(
selectCheckCardModalV2ResponseAble
);
const
responseable
=
useAppSelector
(
selectCheckCardModalV2ResponseAble
);
const
selectHint
=
useAppSelector
(
selectMeHint
)?.
esSelectHint
||
"
请选择卡片
"
;
const
onFinish
=
()
=>
{
const
onFinish
=
()
=>
{
sendSelectUnselectCardResponse
({
cancel_or_finish
:
true
});
sendSelectUnselectCardResponse
({
cancel_or_finish
:
true
});
...
@@ -46,7 +48,7 @@ const CheckCardModalV2 = () => {
...
@@ -46,7 +48,7 @@ const CheckCardModalV2 = () => {
return
(
return
(
<
DragModal
<
DragModal
title=
{
`
请选择未选择的卡片,最少${min}张,最多${max}张
`
}
title=
{
`
${selectHint} ${min}-${max}
`
}
open=
{
isOpen
}
open=
{
isOpen
}
closable=
{
false
}
closable=
{
false
}
footer=
{
footer=
{
...
...
src/ui/Duel/checkCardModalV3.tsx
View file @
ac5439ab
...
@@ -12,6 +12,7 @@ import {
...
@@ -12,6 +12,7 @@ import {
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
{
selectCheckCardModalV3
}
from
"
../../reducers/duel/modal/checkCardModalV3Slice
"
;
import
{
selectCheckCardModalV3
}
from
"
../../reducers/duel/modal/checkCardModalV3Slice
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectMeHint
}
from
"
../../reducers/duel/hintSlice
"
;
const
CheckCardModalV3
=
()
=>
{
const
CheckCardModalV3
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
const
dispatch
=
store
.
dispatch
;
...
@@ -32,6 +33,7 @@ const CheckCardModalV3 = () => {
...
@@ -32,6 +33,7 @@ const CheckCardModalV3 = () => {
.
concat
(
selectedOptions
)
.
concat
(
selectedOptions
)
.
map
((
option
)
=>
option
.
level2
)
.
map
((
option
)
=>
option
.
level2
)
.
reduce
((
sum
,
current
)
=>
sum
+
current
,
0
);
.
reduce
((
sum
,
current
)
=>
sum
+
current
,
0
);
const
selectHint
=
useAppSelector
(
selectMeHint
)?.
esSelectHint
||
"
请选择卡片
"
;
const
responseable
=
const
responseable
=
(
overflow
(
overflow
...
@@ -50,7 +52,7 @@ const CheckCardModalV3 = () => {
...
@@ -50,7 +52,7 @@ const CheckCardModalV3 = () => {
return
(
return
(
<
DragModal
<
DragModal
title=
{
`
请选择卡片,最少${min}张,最多${max}张
`
}
title=
{
`
${selectHint} ${min}-${max}
`
}
open=
{
isOpen
}
open=
{
isOpen
}
closable=
{
false
}
closable=
{
false
}
footer=
{
footer=
{
...
...
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