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
e1115001
Commit
e1115001
authored
Jun 21, 2023
by
timel
Committed by
Chunchi Che
Jun 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: store in devtool, compile error
parent
0c1920d6
Changes
2
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 @
e1115001
...
@@ -6,8 +6,7 @@ import { subscribeKey } from "valtio/utils";
...
@@ -6,8 +6,7 @@ import { subscribeKey } from "valtio/utils";
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
cardStore
,
CardType
,
store
}
from
"
@/stores
"
;
import
{
cardStore
,
CardType
,
matStore
}
from
"
@/stores
"
;
const
{
matStore
}
=
store
;
const
TOKEN_SIZE
=
13
;
// 每人场上最多就只可能有13个token
const
TOKEN_SIZE
=
13
;
// 每人场上最多就只可能有13个token
export
default
async
(
start
:
ygopro
.
StocGameMessage
.
MsgStart
)
=>
{
export
default
async
(
start
:
ygopro
.
StocGameMessage
.
MsgStart
)
=>
{
...
...
src/ui/WaitRoom.tsx
View file @
e1115001
...
@@ -30,7 +30,7 @@ import { DeckManager, fetchDeck, type IDeck } from "@/api/deck";
...
@@ -30,7 +30,7 @@ import { DeckManager, fetchDeck, type IDeck } from "@/api/deck";
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
socketMiddleWare
,
{
socketCmd
}
from
"
@/middleware/socket
"
;
import
socketMiddleWare
,
{
socketCmd
}
from
"
@/middleware/socket
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
import
{
s
tore
}
from
"
@/stores
"
;
import
{
joinStore
,
chatStore
,
moraStore
,
playerS
tore
}
from
"
@/stores
"
;
const
NeosConfig
=
useConfig
();
const
NeosConfig
=
useConfig
();
...
@@ -42,8 +42,11 @@ const {
...
@@ -42,8 +42,11 @@ const {
}
=
useConfig
();
}
=
useConfig
();
const
WaitRoom
=
()
=>
{
const
WaitRoom
=
()
=>
{
const
state
=
store
;
const
snapJoin
=
useSnapshot
(
joinStore
);
const
snap
=
useSnapshot
(
state
);
const
snapChat
=
useSnapshot
(
chatStore
);
const
snapMora
=
useSnapshot
(
moraStore
);
const
snapPlayer
=
useSnapshot
(
playerStore
);
const
params
=
useParams
<
{
const
params
=
useParams
<
{
player
?:
string
;
player
?:
string
;
passWd
?:
string
;
passWd
?:
string
;
...
@@ -89,12 +92,12 @@ const WaitRoom = () => {
...
@@ -89,12 +92,12 @@ const WaitRoom = () => {
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
const
joined
=
snap
.
joinStore
.
value
;
const
joined
=
snap
Join
.
value
;
const
chat
=
snap
.
chatStore
.
message
;
const
chat
=
snap
Chat
.
message
;
const
isHost
=
snap
.
playerStore
.
isHost
;
const
isHost
=
snap
Player
.
isHost
;
const
player0
=
snap
.
playerStore
.
player0
;
const
player0
=
snap
Player
.
player0
;
const
player1
=
snap
.
playerStore
.
player1
;
const
player1
=
snap
Player
.
player1
;
const
duelStart
=
snap
.
moraStore
.
duelStart
;
const
duelStart
=
snap
Mora
.
duelStart
;
// FIXME: 这些数据应该从`store`中获取
// FIXME: 这些数据应该从`store`中获取
// TODO: 云卡组
// 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