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
70b4af60
Commit
70b4af60
authored
May 28, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix eslint
parent
3405b9d2
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
76 additions
and
59 deletions
+76
-59
src/api/cards.ts
src/api/cards.ts
+2
-3
src/env.d.ts
src/env.d.ts
+1
-0
src/infra/index.ts
src/infra/index.ts
+2
-1
src/service/duel/draw.ts
src/service/duel/draw.ts
+2
-2
src/service/duel/move.ts
src/service/duel/move.ts
+1
-1
src/service/duel/posChange.ts
src/service/duel/posChange.ts
+1
-1
src/service/duel/reloadField.ts
src/service/duel/reloadField.ts
+1
-1
src/service/duel/selectBattleCmd.ts
src/service/duel/selectBattleCmd.ts
+1
-1
src/service/duel/selectIdleCmd.ts
src/service/duel/selectIdleCmd.ts
+1
-1
src/service/duel/shuffleHand.ts
src/service/duel/shuffleHand.ts
+1
-1
src/stores/index.tsx
src/stores/index.tsx
+4
-4
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+1
-1
src/stores/placeStore.ts
src/stores/placeStore.ts
+4
-2
src/stores/playerStore.ts
src/stores/playerStore.ts
+1
-0
src/ui/Duel/Main.tsx
src/ui/Duel/Main.tsx
+1
-2
src/ui/Duel/NewPlayMat/Bg/index.tsx
src/ui/Duel/NewPlayMat/Bg/index.tsx
+11
-8
src/ui/Duel/NewPlayMat/Card/index.tsx
src/ui/Duel/NewPlayMat/Card/index.tsx
+8
-5
src/ui/Duel/NewPlayMat/Card/springs/index.ts
src/ui/Duel/NewPlayMat/Card/springs/index.ts
+1
-1
src/ui/Duel/NewPlayMat/Card/springs/toDeck.ts
src/ui/Duel/NewPlayMat/Card/springs/toDeck.ts
+6
-4
src/ui/Duel/NewPlayMat/Card/springs/toGround.ts
src/ui/Duel/NewPlayMat/Card/springs/toGround.ts
+6
-4
src/ui/Duel/NewPlayMat/Card/springs/toHand.ts
src/ui/Duel/NewPlayMat/Card/springs/toHand.ts
+6
-4
src/ui/Duel/NewPlayMat/Card/springs/toOutside.ts
src/ui/Duel/NewPlayMat/Card/springs/toOutside.ts
+6
-4
src/ui/Duel/NewPlayMat/Card/springs/types.ts
src/ui/Duel/NewPlayMat/Card/springs/types.ts
+1
-1
src/ui/Duel/NewPlayMat/Card/springs/utils.ts
src/ui/Duel/NewPlayMat/Card/springs/utils.ts
+1
-1
src/ui/Duel/NewPlayMat/Mat/index.tsx
src/ui/Duel/NewPlayMat/Mat/index.tsx
+6
-6
No files found.
src/api/cards.ts
View file @
70b4af60
import
axios
from
"
axios
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
export
interface
CardMeta
{
...
...
@@ -57,7 +55,8 @@ export async function fetchCard(id: number): Promise<CardMeta> {
return
res
.
selectResult
?
res
.
selectResult
:
{
id
,
data
:
{},
text
:
{}
};
}
window
.
fetchCard
=
fetchCard
;
// TS检查错误,先注释掉
// window.fetchCard = fetchCard;
export
function
getCardStr
(
meta
:
CardMeta
,
idx
:
number
):
string
|
undefined
{
switch
(
idx
)
{
...
...
src/env.d.ts
View file @
70b4af60
...
...
@@ -14,6 +14,7 @@ interface ImportMeta {
import
{
EventEmitter
}
from
"
eventemitter3
"
;
/* eslint no-var: 0 */
declare
global
{
var
eventBus
:
EventEmitter
;
var
myExtraDeckCodes
:
number
[];
...
...
src/infra/index.ts
View file @
70b4af60
// Some implementation of infrastructure
/* eslint import/export: 0 */
export
*
from
"
./eventbus
"
;
export
*
from
"
./sleep
"
;
export
*
from
"
./stream
"
;
export
*
from
"
./eventbus
"
;
src/service/duel/draw.ts
View file @
70b4af60
import
{
sleep
}
from
"
@/infra
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
,
matStore
,
cardStore
}
from
"
@/stores
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
cardStore
,
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
import
{
zip
}
from
"
@/ui/Duel/utils
"
;
export
default
async
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
)
=>
{
...
...
src/service/duel/move.ts
View file @
70b4af60
import
{
v4
as
v4uuid
}
from
"
uuid
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchOverlayMeta
,
store
,
cardStore
,
CardTyp
e
}
from
"
@/stores
"
;
import
{
cardStore
,
CardType
,
fetchOverlayMeta
,
stor
e
}
from
"
@/stores
"
;
type
MsgMove
=
ygopro
.
StocGameMessage
.
MsgMove
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
sleep
}
from
"
@/infra
"
;
...
...
src/service/duel/posChange.ts
View file @
70b4af60
import
{
ygopro
}
from
"
@/api
"
;
import
MsgPosChange
=
ygopro
.
StocGameMessage
.
MsgPosChange
;
import
{
fetchEsHintMeta
,
matStore
,
card
Store
}
from
"
@/stores
"
;
import
{
cardStore
,
fetchEsHintMeta
,
mat
Store
}
from
"
@/stores
"
;
export
default
(
posChange
:
MsgPosChange
)
=>
{
const
{
location
,
controler
,
sequence
}
=
posChange
.
card_info
;
...
...
src/service/duel/reloadField.ts
View file @
70b4af60
import
{
v4
as
uuidv4
}
from
"
uuid
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
,
card
Store
}
from
"
@/stores
"
;
import
{
cardStore
,
mat
Store
}
from
"
@/stores
"
;
type
MsgReloadField
=
ygopro
.
StocGameMessage
.
MsgReloadField
;
type
ZoneActions
=
ygopro
.
StocGameMessage
.
MsgReloadField
.
ZoneAction
[];
...
...
src/service/duel/selectBattleCmd.ts
View file @
70b4af60
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
clearAllIdleInteractivities
as
clearAllIdleInteractivities
,
type
Interactivity
,
InteractType
,
matStore
,
cardStore
,
}
from
"
@/stores
"
;
import
MsgSelectBattleCmd
=
ygopro
.
StocGameMessage
.
MsgSelectBattleCmd
;
...
...
src/service/duel/selectIdleCmd.ts
View file @
70b4af60
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
clearAllIdleInteractivities
as
clearAllIdleInteractivities
,
type
Interactivity
,
InteractType
,
matStore
,
cardStore
,
}
from
"
@/stores
"
;
import
MsgSelectIdleCmd
=
ygopro
.
StocGameMessage
.
MsgSelectIdleCmd
;
...
...
src/service/duel/shuffleHand.ts
View file @
70b4af60
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
,
card
Store
}
from
"
@/stores
"
;
import
{
cardStore
,
mat
Store
}
from
"
@/stores
"
;
import
{
zip
}
from
"
@/ui/Duel/utils
"
;
type
MsgShuffleHand
=
ygopro
.
StocGameMessage
.
MsgShuffleHand
;
...
...
src/stores/index.tsx
View file @
70b4af60
export
*
from
"
./cardStore
"
;
export
*
from
"
./chatStore
"
;
export
*
from
"
./joinStore
"
;
export
*
from
"
./matStore
"
;
export
*
from
"
./messageStore
"
;
export
*
from
"
./moraStore
"
;
export
*
from
"
./playerStore
"
;
export
*
from
"
./cardStore
"
;
export
*
from
"
./placeStore
"
;
export
*
from
"
./playerStore
"
;
import
{
proxy
}
from
"
valtio
"
;
import
{
devtools
}
from
"
valtio/utils
"
;
import
{
cardStore
}
from
"
./cardStore
"
;
import
{
chatStore
}
from
"
./chatStore
"
;
import
{
joinStore
}
from
"
./joinStore
"
;
import
{
matStore
}
from
"
./matStore
"
;
import
{
messageStore
}
from
"
./messageStore
"
;
import
{
moraStore
}
from
"
./moraStore
"
;
import
{
playerStore
}
from
"
./playerStore
"
;
import
{
cardStore
}
from
"
./cardStore
"
;
import
{
placeStore
}
from
"
./placeStore
"
;
import
{
playerStore
}
from
"
./playerStore
"
;
export
const
store
=
proxy
({
playerStore
,
...
...
src/stores/matStore/store.ts
View file @
70b4af60
/* eslint valtio/avoid-this-in-proxy: 0 */
import
{
cloneDeep
}
from
"
lodash-es
"
;
import
{
v4
as
v4uuid
}
from
"
uuid
"
;
import
{
proxy
}
from
"
valtio
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
type
{
CardState
,
...
...
src/stores/placeStore.ts
View file @
70b4af60
import
{
ygopro
}
from
"
@/api
"
;
import
{
proxy
}
from
"
valtio
"
;
import
type
{
Interactivity
}
from
"
./matStore/types
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
type
{
Interactivity
}
from
"
./matStore/types
"
;
export
type
PlaceInteractivity
=
|
Interactivity
<
{
controler
:
number
;
...
...
src/stores/playerStore.ts
View file @
70b4af60
/* eslint valtio/avoid-this-in-proxy: 0 */
import
{
proxy
}
from
"
valtio
"
;
import
{
ygopro
}
from
"
@/api
"
;
...
...
src/ui/Duel/Main.tsx
View file @
70b4af60
...
...
@@ -13,10 +13,9 @@ import {
SortCardModal
,
YesNoModal
,
}
from
"
./Message
"
;
import
Mat
from
"
./PlayMat
"
;
import
{
Mat
as
NewMat
}
from
"
./NewPlayMat
"
;
import
{
Menu
}
from
"
./NewPlayMat/Menu
"
;
import
Mat
from
"
./PlayMat
"
;
const
NeosDuel
=
()
=>
{
return
(
...
...
src/ui/Duel/NewPlayMat/Bg/index.tsx
View file @
70b4af60
import
{
type
FC
}
from
"
react
"
;
import
classnames
from
"
classnames
"
;
import
"
./index.scss
"
;
import
classnames
from
"
classnames
"
;
import
{
type
FC
}
from
"
react
"
;
import
{
type
INTERNAL_Snapshot
as
Snapshot
,
useSnapshot
}
from
"
valtio
"
;
import
{
sendSelectPlaceResponse
,
ygopro
}
from
"
@/api
"
;
import
{
placeStore
,
type
PlaceInteractivity
,
messageStore
,
CardType
,
cardStore
,
CardType
,
messageStore
,
type
PlaceInteractivity
,
placeStore
,
}
from
"
@/stores
"
;
import
{
useSnapshot
,
type
INTERNAL_Snapshot
as
Snapshot
}
from
"
valtio
"
;
import
{
sendSelectPlaceResponse
,
ygopro
}
from
"
@/api
"
;
import
{
interactTypeToString
}
from
"
../../utils
"
;
const
BgExtraRow
:
FC
=
()
=>
{
...
...
src/ui/Duel/NewPlayMat/Card/index.tsx
View file @
70b4af60
import
React
,
{
useEffect
,
type
CSSProperties
,
type
FC
,
useState
}
from
"
react
"
;
import
{
cardStore
,
messageStore
,
CardType
}
from
"
@/stores
"
;
import
"
./index.scss
"
;
import
{
animated
,
to
,
useSpring
}
from
"
@react-spring/web
"
;
import
classnames
from
"
classnames
"
;
import
React
,
{
type
CSSProperties
,
type
FC
,
useEffect
,
useState
}
from
"
react
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
useSpring
,
animated
,
to
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
moveToDeck
,
moveToGround
,
moveToHand
,
moveToOutside
}
from
"
./springs
"
;
import
{
cardStore
,
CardType
,
messageStore
}
from
"
@/stores
"
;
import
{
interactTypeToString
}
from
"
../../utils
"
;
import
classnames
from
"
classname
s
"
;
import
{
moveToDeck
,
moveToGround
,
moveToHand
,
moveToOutside
}
from
"
./spring
s
"
;
const
NeosConfig
=
useConfig
();
...
...
src/ui/Duel/NewPlayMat/Card/springs/index.ts
View file @
70b4af60
export
*
from
"
./toDeck
"
;
export
*
from
"
./toGround
"
;
export
*
from
"
./toHand
"
;
export
*
from
"
./toDeck
"
;
export
*
from
"
./toOutside
"
;
src/ui/Duel/NewPlayMat/Card/springs/toDeck.ts
View file @
70b4af60
import
{
isMe
,
type
CardType
}
from
"
@/stores
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
type
CardType
,
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
...
...
src/ui/Duel/NewPlayMat/Card/springs/toGround.ts
View file @
70b4af60
import
{
isMe
,
type
CardType
}
from
"
@/stores
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
type
CardType
,
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
...
...
src/ui/Duel/NewPlayMat/Card/springs/toHand.ts
View file @
70b4af60
import
{
isMe
,
type
CardType
,
cardStore
}
from
"
@/stores
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
type
CardType
,
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
...
...
src/ui/Duel/NewPlayMat/Card/springs/toOutside.ts
View file @
70b4af60
import
{
isMe
,
type
CardType
}
from
"
@/stores
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
type
CardType
,
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
../../utils
"
;
import
{
SpringApi
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
...
...
src/ui/Duel/NewPlayMat/Card/springs/types.ts
View file @
70b4af60
import
{
type
Spring
Value
,
type
SpringRef
}
from
"
@react-spring/web
"
;
import
{
type
Spring
Ref
,
type
SpringValue
}
from
"
@react-spring/web
"
;
export
type
SpringApi
=
SpringRef
<
{
x
:
number
;
...
...
src/ui/Duel/NewPlayMat/Card/springs/utils.ts
View file @
70b4af60
import
{
type
Spring
Ref
,
type
SpringConfig
}
from
"
@react-spring/web
"
;
import
{
type
Spring
Config
,
type
SpringRef
}
from
"
@react-spring/web
"
;
export
const
asyncStart
=
<
T
extends
{}
>
(
api
:
SpringRef
<
T
>
)
=>
{
return
(
p
:
Partial
<
T
>
&
{
config
:
SpringConfig
})
=>
...
...
src/ui/Duel/NewPlayMat/Mat/index.tsx
View file @
70b4af60
import
type
{
FC
,
PropsWithChildren
}
from
"
react
"
;
import
"
./index.scss
"
;
import
{
Bg
}
from
"
../Bg
"
;
import
{
Card
}
from
"
../Card
"
;
import
{
type
CSSConfig
,
toCssProperties
,
matConfig
}
from
"
../utils
"
;
import
type
{
FC
,
PropsWithChildren
}
from
"
react
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
Bg
}
from
"
../Bg
"
;
import
{
Card
}
from
"
../Card
"
;
import
{
type
CSSConfig
,
matConfig
,
toCssProperties
}
from
"
../utils
"
;
// 后面再改名
export
const
Mat
:
FC
=
()
=>
{
...
...
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