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
582c0349
Commit
582c0349
authored
Jun 28, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove isChain from SelectCardsModalProps
parent
188439f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
7 deletions
+3
-7
src/ui/Duel/Message/CardModal/index.tsx
src/ui/Duel/Message/CardModal/index.tsx
+1
-1
src/ui/Duel/Message/SelectActionsModal/index.tsx
src/ui/Duel/Message/SelectActionsModal/index.tsx
+1
-2
src/ui/Duel/Message/SelectCardsModal/index.tsx
src/ui/Duel/Message/SelectCardsModal/index.tsx
+1
-3
src/ui/Duel/Message/SimpleSelectCardsModal/index.tsx
src/ui/Duel/Message/SimpleSelectCardsModal/index.tsx
+0
-1
No files found.
src/ui/Duel/Message/CardModal/index.tsx
View file @
582c0349
...
@@ -42,7 +42,7 @@ const store = proxy(defaultStore);
...
@@ -42,7 +42,7 @@ const store = proxy(defaultStore);
export
const
CardModal
=
()
=>
{
export
const
CardModal
=
()
=>
{
const
snap
=
useSnapshot
(
store
);
const
snap
=
useSnapshot
(
store
);
const
{
isOpen
,
meta
,
_counters
}
=
snap
;
const
{
isOpen
,
meta
,
counters
:
_counters
}
=
snap
;
const
name
=
meta
?.
text
.
name
;
const
name
=
meta
?.
text
.
name
;
const
types
=
meta
?.
data
.
type
;
const
types
=
meta
?.
data
.
type
;
...
...
src/ui/Duel/Message/SelectActionsModal/index.tsx
View file @
582c0349
...
@@ -16,7 +16,7 @@ const FINISH_RESPONSE = -1;
...
@@ -16,7 +16,7 @@ const FINISH_RESPONSE = -1;
const
defaultProps
:
Omit
<
const
defaultProps
:
Omit
<
SelectCardsModalProps
,
SelectCardsModalProps
,
"
onSubmit
"
|
"
onCancel
"
|
"
onFinish
"
"
onSubmit
"
|
"
onCancel
"
|
"
onFinish
"
>
=
{
>
&
{
isChain
:
boolean
}
=
{
isOpen
:
false
,
isOpen
:
false
,
isChain
:
false
,
isChain
:
false
,
min
:
0
,
min
:
0
,
...
@@ -72,7 +72,6 @@ export const SelectActionsModal: React.FC = () => {
...
@@ -72,7 +72,6 @@ export const SelectActionsModal: React.FC = () => {
<
SelectCardsModal
<
SelectCardsModal
{
...
{
{
...
{
isOpen
,
isOpen
,
isChain
,
min
,
min
,
max
,
max
,
selecteds
,
selecteds
,
...
...
src/ui/Duel/Message/SelectCardsModal/index.tsx
View file @
582c0349
...
@@ -16,7 +16,6 @@ import { NeosModal } from "../NeosModal";
...
@@ -16,7 +16,6 @@ import { NeosModal } from "../NeosModal";
export
interface
SelectCardsModalProps
{
export
interface
SelectCardsModalProps
{
isOpen
:
boolean
;
isOpen
:
boolean
;
isChain
:
boolean
;
min
:
number
;
min
:
number
;
max
:
number
;
max
:
number
;
selecteds
:
Snapshot
<
Option
[]
>
;
// 已经选择了的卡
selecteds
:
Snapshot
<
Option
[]
>
;
// 已经选择了的卡
...
@@ -33,7 +32,6 @@ export interface SelectCardsModalProps {
...
@@ -33,7 +32,6 @@ export interface SelectCardsModalProps {
export
const
SelectCardsModal
:
React
.
FC
<
SelectCardsModalProps
>
=
({
export
const
SelectCardsModal
:
React
.
FC
<
SelectCardsModalProps
>
=
({
isOpen
,
isOpen
,
isChain
:
_isChain
,
min
,
min
,
max
,
max
,
selecteds
:
_selecteds
,
selecteds
:
_selecteds
,
...
@@ -47,7 +45,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
...
@@ -47,7 +45,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
onCancel
,
onCancel
,
onFinish
,
onFinish
,
})
=>
{
})
=>
{
// FIXME: handle `
isChain` and `
selecteds`
// FIXME: handle `selecteds`
const
[
result
,
setResult
]
=
useState
<
Option
[]
>
([]);
const
[
result
,
setResult
]
=
useState
<
Option
[]
>
([]);
const
[
submitable
,
setSubmitable
]
=
useState
(
false
);
const
[
submitable
,
setSubmitable
]
=
useState
(
false
);
const
single
=
min
===
1
&&
max
===
1
;
// 是否是单选
const
single
=
min
===
1
&&
max
===
1
;
// 是否是单选
...
...
src/ui/Duel/Message/SimpleSelectCardsModal/index.tsx
View file @
582c0349
...
@@ -15,7 +15,6 @@ export const SimpleSelectCardsModal: React.FC = () => {
...
@@ -15,7 +15,6 @@ export const SimpleSelectCardsModal: React.FC = () => {
return
(
return
(
<
SelectCardsModal
<
SelectCardsModal
isOpen=
{
isOpen
}
isOpen=
{
isOpen
}
isChain=
{
false
}
min=
{
1
}
min=
{
1
}
max=
{
1
}
max=
{
1
}
selecteds=
{
[]
}
selecteds=
{
[]
}
...
...
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