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
cc48ea8b
Commit
cc48ea8b
authored
Jun 25, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: small
parent
d7e1f353
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
16 deletions
+34
-16
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+3
-8
src/ui/Duel/PlayMat/LifeBar/index.tsx
src/ui/Duel/PlayMat/LifeBar/index.tsx
+4
-4
src/ui/Duel/PlayMat/Menu/index.scss
src/ui/Duel/PlayMat/Menu/index.scss
+23
-0
src/ui/Duel/PlayMat/Menu/index.tsx
src/ui/Duel/PlayMat/Menu/index.tsx
+4
-4
No files found.
src/ui/Duel/PlayMat/Card/index.tsx
View file @
cc48ea8b
...
...
@@ -136,10 +136,6 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
useEffect
(()
=>
{
setHighlight
(
!!
idleInteractivities
.
length
);
},
[
idleInteractivities
]);
const
onDropdownClick
:
MenuProps
[
"
onClick
"
]
=
({
key
})
=>
{
const
index
=
Number
(
key
);
dropdownMenu
.
value
?.[
index
]?.
onClick
();
};
const
menuItems
=
useSnapshot
(
dropdownMenu
);
// <<< 效果 <<<
...
...
@@ -195,10 +191,9 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
const
onCardClick
=
(
card
:
CardType
)
=>
{
// 中央弹窗展示选中卡牌信息
// TODO: 对方的卡片/未知的卡片,点击应该是没有效果的
// TODO: 同一张卡片,是否重复点击会关闭CardModal?
displayCardModal
(
card
);
handleDropdownMenu
([
card
],
false
);
if
(
card
.
idleInteractivities
)
handleDropdownMenu
([
card
],
false
);
// 侧边栏展示超量素材信息
const
overlayMaterials
=
cardStore
.
findOverlay
(
...
...
@@ -241,8 +236,8 @@ const handleEffectActivation = (
effectInteractivies
:
Interactivy
[],
meta
?:
any
// FIXME: meta的类型
)
=>
{
// 不用考虑为0的情况,因为已经判断了不可能为0
if
(
effectInteractivies
.
length
===
1
)
{
if
(
!
effectInteractivies
.
length
)
return
;
else
if
(
effectInteractivies
.
length
===
1
)
{
// 如果只有一个效果,点击直接触发
sendSelectIdleCmdResponse
(
effectInteractivies
[
0
].
response
);
}
else
{
...
...
src/ui/Duel/PlayMat/LifeBar/index.tsx
View file @
cc48ea8b
...
...
@@ -11,14 +11,14 @@ export const LifeBar: React.FC = () => {
return
(
<
div
id=
"life-bar-container"
>
<
div
className=
"life-bar"
>
<
div
className=
"name"
>
{
snapPlayer
.
getMePlayer
().
name
}
</
div
>
<
div
className=
"life"
>
{
snap
.
me
.
life
}
</
div
>
</
div
>
<
div
className=
"life-bar"
>
<
div
className=
"name"
>
{
snapPlayer
.
getOpPlayer
().
name
}
</
div
>
<
div
className=
"life"
>
{
snap
.
op
.
life
}
</
div
>
</
div
>
<
div
className=
"life-bar"
>
<
div
className=
"name"
>
{
snapPlayer
.
getMePlayer
().
name
}
</
div
>
<
div
className=
"life"
>
{
snap
.
me
.
life
}
</
div
>
</
div
>
</
div
>
);
};
src/ui/Duel/PlayMat/Menu/index.scss
View file @
cc48ea8b
...
...
@@ -9,4 +9,27 @@
background-color
:
#323232
;
padding
:
8px
;
border-radius
:
6px
;
overflow
:
hidden
;
.floodlight
{
position
:
absolute
;
height
:
100%
;
width
:
40px
;
background-color
:
white
;
top
:
0
;
right
:
0
;
filter
:
blur
(
30px
);
transform
:
skewX
(
-20deg
);
}
.floodlight-run
{
animation
:
floodlight
1s
linear
infinite
;
}
}
@keyframes
floodlight
{
0
%
{
right
:
-80px
;
}
100
%
{
right
:
calc
(
100%
+
80px
);
}
}
src/ui/Duel/PlayMat/Menu/index.tsx
View file @
cc48ea8b
...
...
@@ -13,12 +13,11 @@ import {
Dropdown
,
type
DropdownProps
,
type
MenuProps
,
Popconfirm
,
Space
,
theme
,
Tooltip
,
}
from
"
antd
"
;
import
{
cloneElement
,
useState
}
from
"
react
"
;
import
{
cloneElement
}
from
"
react
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
...
...
@@ -37,7 +36,7 @@ export const Menu = () => {
const
{
currentPlayer
}
=
useSnapshot
(
matStore
);
const
currentPhase
=
snapPhase
.
currentPhase
;
const
r
esponse
=
[
const
endR
esponse
=
[
PhaseType
.
BATTLE_START
,
PhaseType
.
BATTLE_STEP
,
PhaseType
.
DAMAGE
,
...
...
@@ -63,7 +62,7 @@ export const Menu = () => {
// [PhaseType.DAMAGE, "伤害步骤", 3],
// [PhaseType.DAMAGE_GAL, "伤害步骤(伤害计算)", 3],
[
PhaseType
.
MAIN2
,
"
主要阶段 2
"
,
2
],
[
PhaseType
.
END
,
"
结束阶段
"
,
r
esponse
],
[
PhaseType
.
END
,
"
结束阶段
"
,
endR
esponse
],
// [PhaseType.UNKNOWN, "未知阶段", response],
];
...
...
@@ -126,6 +125,7 @@ export const Menu = () => {
>
<
Button
icon=
{
<
CloseCircleFilled
/>
}
type=
"text"
></
Button
>
</
DropdownWithTitle
>
{
/* <div className="floodlight floodlight-run" /> */
}
</
div
>
</>
);
...
...
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