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
8bf56875
Commit
8bf56875
authored
Jun 06, 2024
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 零成本抽象
parent
c7e976ea
Pipeline
#27553
passed with stages
in 7 minutes and 19 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/ui/Duel/Main.tsx
src/ui/Duel/Main.tsx
+5
-2
src/ui/Match/ReplayModal/index.tsx
src/ui/Match/ReplayModal/index.tsx
+3
-0
No files found.
src/ui/Duel/Main.tsx
View file @
8bf56875
...
...
@@ -24,6 +24,7 @@ import { AnnounceModal } from "./Message/AnnounceModal";
import
{
LifeBar
,
Mat
,
Menu
,
Underlying
}
from
"
./PlayMat
"
;
import
{
ChatBox
}
from
"
./PlayMat/ChatBox
"
;
import
{
HandChain
}
from
"
./PlayMat/HandChain
"
;
import
{
useEnv
}
from
"
@/hook
"
;
export
const
loader
:
LoaderFunction
=
async
()
=>
{
// 更新场景
...
...
@@ -38,14 +39,16 @@ export const Component: React.FC = () => {
// 如果处于开发时的本地文件回放模式,则重新跳回Match且保持record参数,从而开始下一轮播放
const
[
searchParams
]
=
useSearchParams
();
const
{
DEV
}
=
useEnv
();
useEffect
(()
=>
{
const
devReplayFile
=
searchParams
.
get
(
"
record
"
);
if
(
!
DEV
)
return
;
const
recordName
=
searchParams
.
get
(
"
record
"
);
if
(
searchParams
&&
matStore
.
selfType
===
ygopro
.
StocTypeChange
.
SelfType
.
UNKNOWN
)
{
navigate
(
`/match?record=
${
devReplayFil
e
}
`
);
navigate
(
`/match?record=
${
recordNam
e
}
`
);
}
},
[]);
...
...
src/ui/Match/ReplayModal/index.tsx
View file @
8bf56875
...
...
@@ -7,6 +7,7 @@ import { replayStore } from "@/stores";
import
{
Uploader
}
from
"
../../Shared
"
;
import
{
connectSrvpro
}
from
"
../util
"
;
import
{
useEnv
}
from
"
@/hook
"
;
const
localStore
=
proxy
({
open
:
false
,
...
...
@@ -44,10 +45,12 @@ export const ReplayModal: React.FC = () => {
// 开发时的回放模式:路径跳转到duel
const
[
searchParams
]
=
useSearchParams
();
const
{
DEV
}
=
useEnv
();
const
recordName
=
searchParams
.
get
(
"
record
"
);
// 如处于回放模式且有回放文件,则导入播放
useEffect
(()
=>
{
if
(
!
DEV
)
return
;
if
(
recordName
)
{
import
(
/* @vite-ignore */
`../../../../neos-assets/records/
${
recordName
}
.yrp3d?arraybuffer`
...
...
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