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
f41155d8
Commit
f41155d8
authored
May 07, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
71871e17
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
21 deletions
+26
-21
src/stores/messageStore/methods/clearSelectActions.ts
src/stores/messageStore/methods/clearSelectActions.ts
+17
-0
src/stores/messageStore/methods/index.ts
src/stores/messageStore/methods/index.ts
+1
-0
src/ui/Duel/Main.tsx
src/ui/Duel/Main.tsx
+2
-2
src/ui/Duel/Message/SelectActionsModal.tsx
src/ui/Duel/Message/SelectActionsModal.tsx
+5
-18
src/ui/Duel/Message/index.ts
src/ui/Duel/Message/index.ts
+1
-1
No files found.
src/stores/messageStore/methods/clearSelectActions.ts
0 → 100644
View file @
f41155d8
import
{
messageStore
}
from
"
../store
"
;
const
{
selectCardActions
}
=
messageStore
;
export
const
clearSelectActions
=
()
=>
{
selectCardActions
.
isOpen
=
false
;
selectCardActions
.
isChain
=
undefined
;
selectCardActions
.
min
=
undefined
;
selectCardActions
.
max
=
undefined
;
selectCardActions
.
cancelAble
=
false
;
selectCardActions
.
totalLevels
=
undefined
;
selectCardActions
.
selecteds
=
[];
selectCardActions
.
selectables
=
[];
selectCardActions
.
mustSelects
=
[];
selectCardActions
.
finishAble
=
false
;
selectCardActions
.
overflow
=
false
;
};
src/stores/messageStore/methods/index.ts
View file @
f41155d8
export
*
from
"
./clearAllIdleInteractivities
"
;
export
*
from
"
./clearAllPlaceInteradtivities
"
;
export
*
from
"
./clearSelectActions
"
;
src/ui/Duel/Main.tsx
View file @
f41155d8
...
...
@@ -4,11 +4,11 @@ import {
Alert
,
CardListModal
,
CardModal
,
CheckCardModal
,
CheckCounterModal
,
HintNotification
,
OptionModal
,
PositionModal
,
SelectActionsModal
,
SortCardModal
,
YesNoModal
,
}
from
"
./Message
"
;
...
...
@@ -22,7 +22,7 @@ const NeosDuel = () => {
<
CardModal
/>
<
CardListModal
/>
<
HintNotification
/>
<
CheckCard
Modal
/>
<
SelectActions
Modal
/>
<
YesNoModal
/>
<
PositionModal
/>
<
OptionModal
/>
...
...
src/ui/Duel/Message/
CheckCard
Modal.tsx
→
src/ui/Duel/Message/
SelectActions
Modal.tsx
View file @
f41155d8
...
...
@@ -10,7 +10,7 @@ import {
sendSelectSingleResponse
,
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
matStore
,
messageStore
}
from
"
@/stores
"
;
import
{
clearSelectActions
,
matStore
,
messageStore
}
from
"
@/stores
"
;
import
{
DragModal
}
from
"
./DragModal
"
;
...
...
@@ -20,7 +20,7 @@ const FINISH_RESPONSE = -1;
const
{
selectCardActions
}
=
messageStore
;
export
const
CheckCard
Modal
=
()
=>
{
export
const
SelectActions
Modal
=
()
=>
{
const
snap
=
useSnapshot
(
selectCardActions
);
const
isOpen
=
snap
.
isOpen
;
const
isChain
=
snap
.
isChain
;
...
...
@@ -55,19 +55,6 @@ export const CheckCardModal = () => {
?
response
.
length
==
1
:
response
.
length
>=
min
&&
response
.
length
<=
max
&&
levelMatched
;
const
resetCheckCardModal
=
()
=>
{
selectCardActions
.
isOpen
=
false
;
selectCardActions
.
isChain
=
undefined
;
selectCardActions
.
min
=
undefined
;
selectCardActions
.
max
=
undefined
;
selectCardActions
.
cancelAble
=
false
;
selectCardActions
.
totalLevels
=
undefined
;
selectCardActions
.
selecteds
=
[];
selectCardActions
.
selectables
=
[];
selectCardActions
.
finishAble
=
false
;
selectCardActions
.
overflow
=
false
;
};
return
(
<
DragModal
title=
{
`${preHintMsg} ${selectHintMsg} ${min}-${max} ${
...
...
@@ -89,7 +76,7 @@ export const CheckCardModal = () => {
}
else
{
sendSelectMultiResponse
(
values
);
}
resetCheckCardModal
();
clearSelectActions
();
}
}
onFocus=
{
()
=>
{}
}
onBlur=
{
()
=>
{}
}
...
...
@@ -100,7 +87,7 @@ export const CheckCardModal = () => {
disabled=
{
!
finishable
}
onClick=
{
()
=>
{
sendSelectSingleResponse
(
FINISH_RESPONSE
);
resetCheckCardModal
();
clearSelectActions
();
}
}
onFocus=
{
()
=>
{}
}
onBlur=
{
()
=>
{}
}
...
...
@@ -112,7 +99,7 @@ export const CheckCardModal = () => {
disabled=
{
!
cancelable
}
onClick=
{
()
=>
{
sendSelectSingleResponse
(
CANCEL_RESPONSE
);
resetCheckCardModal
();
clearSelectActions
();
}
}
onFocus=
{
()
=>
{}
}
onBlur=
{
()
=>
{}
}
...
...
src/ui/Duel/Message/index.ts
View file @
f41155d8
export
*
from
"
./Alert
"
;
export
*
from
"
./CardListModal
"
;
export
*
from
"
./CardModal
"
;
export
*
from
"
./CheckCardModal
"
;
export
*
from
"
./CheckCounterModal
"
;
export
*
from
"
./DragModal
"
;
export
*
from
"
./HintNotification
"
;
export
*
from
"
./OptionModal
"
;
export
*
from
"
./PositionModal
"
;
export
*
from
"
./SelectActionsModal
"
;
export
*
from
"
./SendBox
"
;
export
*
from
"
./SortCardModal
"
;
export
*
from
"
./Status
"
;
...
...
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