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
64510003
Commit
64510003
authored
Jul 20, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 80%
parent
dbbf2469
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
33 deletions
+36
-33
src/ui/Duel/PlayMat/Menu/index.module.scss
src/ui/Duel/PlayMat/Menu/index.module.scss
+0
-0
src/ui/Duel/PlayMat/Menu/index.tsx
src/ui/Duel/PlayMat/Menu/index.tsx
+36
-33
No files found.
src/ui/Duel/PlayMat/Menu/index.scss
→
src/ui/Duel/PlayMat/Menu/index.
module.
scss
View file @
64510003
File moved
src/ui/Duel/PlayMat/Menu/index.tsx
View file @
64510003
import
"
./index
.scss
"
;
import
styles
from
"
./index.module
.scss
"
;
import
{
ArrowRightOutlined
,
...
...
@@ -53,7 +53,12 @@ export const Menu = () => {
:
7
;
// PhaseType, 中文, response, 是否显示
const
phaseBind
:
[
PhaseType
,
string
,
number
,
boolean
][]
=
[
const
phaseBind
:
[
phase
:
PhaseType
,
label
:
string
,
response
:
number
,
show
:
boolean
][]
=
[
[
PhaseType
.
DRAW
,
"
抽卡阶段
"
,
-
1
,
true
],
[
PhaseType
.
STANDBY
,
"
准备阶段
"
,
-
1
,
true
],
[
PhaseType
.
MAIN1
,
"
主要阶段 1
"
,
-
1
,
true
],
...
...
@@ -69,9 +74,9 @@ export const Menu = () => {
const
phaseSwitchItems
:
MenuProps
[
"
items
"
]
=
phaseBind
.
filter
(([,
,
,
show
])
=>
show
)
.
map
(([
phase
,
str
,
response
],
i
)
=>
({
key
:
i
,
label
:
str
,
.
map
(([
phase
,
label
,
response
],
key
)
=>
({
key
,
label
,
disabled
:
currentPhase
>=
phase
,
onClick
:
()
=>
{
if
(
response
===
2
)
sendSelectIdleCmdResponse
(
response
);
...
...
@@ -95,37 +100,35 @@ export const Menu = () => {
const
globalDisable
=
!
matStore
.
isMe
(
currentPlayer
);
return
(
<>
<
div
className=
"menu-container"
>
<
DropdownWithTitle
title=
"请选择要进入的阶段"
menu=
{
{
items
:
phaseSwitchItems
}
}
<
div
className=
{
styles
[
"
menu-container
"
]
}
>
<
DropdownWithTitle
title=
"请选择要进入的阶段"
menu=
{
{
items
:
phaseSwitchItems
}
}
disabled=
{
globalDisable
}
>
<
Button
icon=
{
<
StepForwardFilled
style=
{
{
transform
:
"
scale(1.5)
"
}
}
/>
}
type=
"text"
disabled=
{
globalDisable
}
>
<
Button
icon=
{
<
StepForwardFilled
style=
{
{
transform
:
"
scale(1.5)
"
}
}
/>
}
type=
"text"
disabled=
{
globalDisable
}
>
{
phaseBind
.
find
(([
key
])
=>
key
===
currentPhase
)?.[
1
]
}
</
Button
>
</
DropdownWithTitle
>
<
Tooltip
title=
"聊天室"
>
<
Button
icon=
{
<
MessageFilled
/>
}
type=
"text"
disabled=
{
globalDisable
}
></
Button
>
</
Tooltip
>
<
DropdownWithTitle
title=
"是否投降?"
menu=
{
{
items
:
surrenderMenuItems
}
}
{
phaseBind
.
find
(([
key
])
=>
key
===
currentPhase
)?.[
1
]
}
</
Button
>
</
DropdownWithTitle
>
<
Tooltip
title=
"聊天室"
>
<
Button
icon=
{
<
MessageFilled
/>
}
type=
"text"
disabled=
{
globalDisable
}
>
<
Button
icon=
{
<
CloseCircleFilled
/>
}
type=
"text"
></
Button
>
</
DropdownWithTitle
>
</
div
>
</>
></
Button
>
</
Tooltip
>
<
DropdownWithTitle
title=
"是否投降?"
menu=
{
{
items
:
surrenderMenuItems
}
}
disabled=
{
globalDisable
}
>
<
Button
icon=
{
<
CloseCircleFilled
/>
}
type=
"text"
></
Button
>
</
DropdownWithTitle
>
</
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