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
e7f6cf8c
Commit
e7f6cf8c
authored
Sep 07, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/select_card' into 'main'
fix fetchCheckCardMeta and spring focus See merge request
!303
parents
f7897383
5af04b89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/service/utils/fetchCheckCardMeta.ts
src/service/utils/fetchCheckCardMeta.ts
+10
-2
src/ui/Duel/PlayMat/Card/springs/focus.ts
src/ui/Duel/PlayMat/Card/springs/focus.ts
+2
-1
No files found.
src/service/utils/fetchCheckCardMeta.ts
View file @
e7f6cf8c
...
...
@@ -25,11 +25,19 @@ const helper = async (
selected
?:
boolean
,
mustSelect
?:
boolean
,
)
=>
{
const
controller
=
location
.
controller
;
const
{
controller
,
zone
,
sequence
}
=
location
;
const
target
=
cardStore
.
at
(
zone
,
controller
,
sequence
);
// 这里可能直接用target.meta即可,不用再查一遍DB
// 但是ygopro后端传回来了code,感觉这里会有些坑,因此求稳这样写
const
newID
=
code
!==
0
?
code
:
cardStore
.
at
(
location
.
zone
,
controller
,
location
.
sequence
)?.
code
||
0
;
:
target
!==
undefined
?
target
.
code
!==
0
?
target
.
code
:
target
.
meta
.
id
:
0
;
const
meta
=
fetchCard
(
newID
);
const
effectDesc
=
effect_description
...
...
src/ui/Duel/PlayMat/Card/springs/focus.ts
View file @
e7f6cf8c
...
...
@@ -9,7 +9,8 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => {
const
{
card
,
api
}
=
props
;
if
(
card
.
location
.
zone
===
ygopro
.
CardZone
.
HAND
||
card
.
location
.
zone
===
ygopro
.
CardZone
.
DECK
card
.
location
.
zone
===
ygopro
.
CardZone
.
DECK
||
card
.
location
.
zone
===
ygopro
.
CardZone
.
EXTRA
)
{
const
current
=
{
...
api
.
current
[
0
].
get
()
};
await
asyncStart
(
api
)({
...
...
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