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
188439f5
Commit
188439f5
authored
Jun 28, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lint
parent
44d9aa52
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
10 deletions
+5
-10
src/ui/Duel/Message/CardListModal.tsx
src/ui/Duel/Message/CardListModal.tsx
+0
-3
src/ui/Duel/Message/CardModal/index.tsx
src/ui/Duel/Message/CardModal/index.tsx
+2
-2
src/ui/Duel/Message/OptionModal.tsx
src/ui/Duel/Message/OptionModal.tsx
+0
-1
src/ui/Duel/Message/SelectCardsModal/index.tsx
src/ui/Duel/Message/SelectCardsModal/index.tsx
+3
-2
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+0
-2
No files found.
src/ui/Duel/Message/CardListModal.tsx
View file @
188439f5
...
@@ -3,14 +3,11 @@ import React from "react";
...
@@ -3,14 +3,11 @@ import React from "react";
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
cardStore
,
CardType
}
from
"
@/stores
"
;
import
{
cardStore
,
CardType
}
from
"
@/stores
"
;
import
{
YgoCard
}
from
"
@/ui/Shared
"
;
import
{
YgoCard
}
from
"
@/ui/Shared
"
;
import
{
showCardModal
}
from
"
./CardModal
"
;
import
{
showCardModal
}
from
"
./CardModal
"
;
const
NeosConfig
=
useConfig
();
const
CARD_WIDTH
=
100
;
const
CARD_WIDTH
=
100
;
// TODO: 显示的位置还需要细细斟酌
// TODO: 显示的位置还需要细细斟酌
...
...
src/ui/Duel/Message/CardModal/index.tsx
View file @
188439f5
...
@@ -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
}
=
snap
;
const
name
=
meta
?.
text
.
name
;
const
name
=
meta
?.
text
.
name
;
const
types
=
meta
?.
data
.
type
;
const
types
=
meta
?.
data
.
type
;
...
@@ -152,7 +152,7 @@ const AtkLine = (props: { atk?: number; def?: number }) => (
...
@@ -152,7 +152,7 @@ const AtkLine = (props: { atk?: number; def?: number }) => (
);
);
// TODO: 未完成,研究一下怎么展示这个信息
// TODO: 未完成,研究一下怎么展示这个信息
const
CounterLine
=
(
props
:
{
counters
:
{
[
type
:
number
]:
number
}
})
=>
{
const
_
CounterLine
=
(
props
:
{
counters
:
{
[
type
:
number
]:
number
}
})
=>
{
const
counters
=
[];
const
counters
=
[];
for
(
const
counterType
in
props
.
counters
)
{
for
(
const
counterType
in
props
.
counters
)
{
const
count
=
props
.
counters
[
counterType
];
const
count
=
props
.
counters
[
counterType
];
...
...
src/ui/Duel/Message/OptionModal.tsx
View file @
188439f5
...
@@ -8,7 +8,6 @@ import {
...
@@ -8,7 +8,6 @@ import {
getCardStr
,
getCardStr
,
sendSelectIdleCmdResponse
,
sendSelectIdleCmdResponse
,
sendSelectOptionResponse
,
sendSelectOptionResponse
,
ygopro
,
}
from
"
@/api
"
;
}
from
"
@/api
"
;
import
{
NeosModal
}
from
"
./NeosModal
"
;
import
{
NeosModal
}
from
"
./NeosModal
"
;
...
...
src/ui/Duel/Message/SelectCardsModal/index.tsx
View file @
188439f5
...
@@ -33,10 +33,10 @@ export interface SelectCardsModalProps {
...
@@ -33,10 +33,10 @@ export interface SelectCardsModalProps {
export
const
SelectCardsModal
:
React
.
FC
<
SelectCardsModalProps
>
=
({
export
const
SelectCardsModal
:
React
.
FC
<
SelectCardsModalProps
>
=
({
isOpen
,
isOpen
,
isChain
,
isChain
:
_isChain
,
min
,
min
,
max
,
max
,
selecteds
,
selecteds
:
_selecteds
,
selectables
,
selectables
,
mustSelects
,
mustSelects
,
cancelable
,
cancelable
,
...
@@ -47,6 +47,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
...
@@ -47,6 +47,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
onCancel
,
onCancel
,
onFinish
,
onFinish
,
})
=>
{
})
=>
{
// FIXME: handle `isChain` and `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/PlayMat/Card/index.tsx
View file @
188439f5
...
@@ -7,7 +7,6 @@ import React, { type CSSProperties, useEffect, useState } from "react";
...
@@ -7,7 +7,6 @@ import React, { type CSSProperties, useEffect, useState } from "react";
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
getCardStr
,
sendSelectIdleCmdResponse
,
ygopro
}
from
"
@/api
"
;
import
{
getCardStr
,
sendSelectIdleCmdResponse
,
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
,
CardType
,
Interactivity
,
InteractType
}
from
"
@/stores
"
;
import
{
cardStore
,
CardType
,
Interactivity
,
InteractType
}
from
"
@/stores
"
;
import
{
showCardModal
as
displayCardModal
}
from
"
@/ui/Duel/Message/CardModal
"
;
import
{
showCardModal
as
displayCardModal
}
from
"
@/ui/Duel/Message/CardModal
"
;
...
@@ -28,7 +27,6 @@ import {
...
@@ -28,7 +27,6 @@ import {
moveToOutside
,
moveToOutside
,
}
from
"
./springs
"
;
}
from
"
./springs
"
;
import
type
{
SpringApiProps
}
from
"
./springs/types
"
;
import
type
{
SpringApiProps
}
from
"
./springs/types
"
;
const
NeosConfig
=
useConfig
();
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
ygopro
.
CardZone
;
ygopro
.
CardZone
;
...
...
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