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
baichixing
Neos
Commits
897615a4
Commit
897615a4
authored
Jun 22, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/hot-reload' into 'main'
fix: small See merge request
!379
parents
6b669d0a
e744004a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
src/ui/Duel/Main.tsx
src/ui/Duel/Main.tsx
+4
-3
src/ui/Match/ReplayModal/index.tsx
src/ui/Match/ReplayModal/index.tsx
+7
-2
No files found.
src/ui/Duel/Main.tsx
View file @
897615a4
...
@@ -40,15 +40,16 @@ export const Component: React.FC = () => {
...
@@ -40,15 +40,16 @@ export const Component: React.FC = () => {
// 如果处于开发时的本地文件回放模式,则重新跳回Match且保持record参数,从而开始下一轮播放
// 如果处于开发时的本地文件回放模式,则重新跳回Match且保持record参数,从而开始下一轮播放
const
[
searchParams
]
=
useSearchParams
();
const
[
searchParams
]
=
useSearchParams
();
const
{
DEV
}
=
useEnv
();
const
{
DEV
}
=
useEnv
();
const
RECORD
=
"
record
"
;
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
DEV
)
return
;
if
(
!
DEV
)
return
;
const
recordName
=
searchParams
.
get
(
"
record
"
);
const
recordName
=
searchParams
.
get
(
RECORD
);
if
(
if
(
searchParams
&&
recordName
&&
matStore
.
selfType
===
ygopro
.
StocTypeChange
.
SelfType
.
UNKNOWN
matStore
.
selfType
===
ygopro
.
StocTypeChange
.
SelfType
.
UNKNOWN
)
{
)
{
navigate
(
`/match?
record=
${
recordName
}
`
);
navigate
(
`/match?
${
new
URLSearchParams
({
[
RECORD
]:
recordName
})
}
`
);
}
}
},
[]);
},
[]);
...
...
src/ui/Match/ReplayModal/index.tsx
View file @
897615a4
...
@@ -48,7 +48,8 @@ export const ReplayModal: React.FC = () => {
...
@@ -48,7 +48,8 @@ export const ReplayModal: React.FC = () => {
// 开发时的回放模式:路径跳转到duel
// 开发时的回放模式:路径跳转到duel
const
[
searchParams
]
=
useSearchParams
();
const
[
searchParams
]
=
useSearchParams
();
const
{
DEV
}
=
useEnv
();
const
{
DEV
}
=
useEnv
();
const
recordName
=
searchParams
.
get
(
"
record
"
);
const
RECORD
=
"
record
"
;
const
recordName
=
searchParams
.
get
(
RECORD
);
// 如处于回放模式且有回放文件,则导入播放
// 如处于回放模式且有回放文件,则导入播放
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -68,7 +69,11 @@ export const ReplayModal: React.FC = () => {
...
@@ -68,7 +69,11 @@ export const ReplayModal: React.FC = () => {
localStore
.
open
=
false
;
localStore
.
open
=
false
;
localStore
.
hasStart
=
false
;
localStore
.
hasStart
=
false
;
// 跳转
// 跳转
navigate
(
recordName
?
`/duel?record=
${
recordName
}
`
:
"
/duel
"
);
navigate
(
recordName
?
`/duel?
${
new
URLSearchParams
({
[
RECORD
]:
recordName
})}
`
:
"
/duel
"
,
);
}
}
},
[
hasStart
]);
},
[
hasStart
]);
...
...
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