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
e744004a
Commit
e744004a
authored
Jun 07, 2024
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: small
parent
e2380147
Pipeline
#27561
passed with stages
in 8 minutes and 19 seconds
Changes
2
Pipelines
1
Hide 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 @
e744004a
...
@@ -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 @
e744004a
...
@@ -46,7 +46,8 @@ export const ReplayModal: React.FC = () => {
...
@@ -46,7 +46,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
(()
=>
{
...
@@ -66,7 +67,11 @@ export const ReplayModal: React.FC = () => {
...
@@ -66,7 +67,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