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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
6ed4caf8
Commit
6ed4caf8
authored
Jun 21, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: store in devtool, compile error
parent
56da0de2
Pipeline
#22348
failed with stages
in 14 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
src/service/duel/start.ts
src/service/duel/start.ts
+1
-2
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+12
-9
No files found.
src/service/duel/start.ts
View file @
6ed4caf8
...
...
@@ -6,8 +6,7 @@ import { subscribeKey } from "valtio/utils";
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
cardStore
,
CardType
,
store
}
from
"
@/stores
"
;
const
{
matStore
}
=
store
;
import
{
cardStore
,
CardType
,
matStore
}
from
"
@/stores
"
;
const
TOKEN_SIZE
=
13
;
// 每人场上最多就只可能有13个token
export
default
async
(
start
:
ygopro
.
StocGameMessage
.
MsgStart
)
=>
{
...
...
src/ui/WaitRoom.tsx
View file @
6ed4caf8
...
...
@@ -30,7 +30,7 @@ import { DeckManager, fetchDeck, type IDeck } from "@/api/deck";
import
{
useConfig
}
from
"
@/config
"
;
import
socketMiddleWare
,
{
socketCmd
}
from
"
@/middleware/socket
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
import
{
s
tore
}
from
"
@/stores
"
;
import
{
joinStore
,
chatStore
,
moraStore
,
playerS
tore
}
from
"
@/stores
"
;
const
NeosConfig
=
useConfig
();
...
...
@@ -42,8 +42,11 @@ const {
}
=
useConfig
();
const
WaitRoom
=
()
=>
{
const
state
=
store
;
const
snap
=
useSnapshot
(
state
);
const
snapJoin
=
useSnapshot
(
joinStore
);
const
snapChat
=
useSnapshot
(
chatStore
);
const
snapMora
=
useSnapshot
(
moraStore
);
const
snapPlayer
=
useSnapshot
(
playerStore
);
const
params
=
useParams
<
{
player
?:
string
;
passWd
?:
string
;
...
...
@@ -89,12 +92,12 @@ const WaitRoom = () => {
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
const
joined
=
snap
.
joinStore
.
value
;
const
chat
=
snap
.
chatStore
.
message
;
const
isHost
=
snap
.
playerStore
.
isHost
;
const
player0
=
snap
.
playerStore
.
player0
;
const
player1
=
snap
.
playerStore
.
player1
;
const
duelStart
=
snap
.
moraStore
.
duelStart
;
const
joined
=
snap
Join
.
value
;
const
chat
=
snap
Chat
.
message
;
const
isHost
=
snap
Player
.
isHost
;
const
player0
=
snap
Player
.
player0
;
const
player1
=
snap
Player
.
player1
;
const
duelStart
=
snap
Mora
.
duelStart
;
// FIXME: 这些数据应该从`store`中获取
// TODO: 云卡组
...
...
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