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
679c2d85
Commit
679c2d85
authored
Jul 29, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: small
parent
bfe20ce5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
20 deletions
+53
-20
neos-assets/neos-logo.svg
neos-assets/neos-logo.svg
+1
-1
src/ui/Duel/PlayMat/Menu/index.module.scss
src/ui/Duel/PlayMat/Menu/index.module.scss
+4
-0
src/ui/Duel/PlayMat/Menu/index.tsx
src/ui/Duel/PlayMat/Menu/index.tsx
+47
-18
src/ui/Start/index.module.scss
src/ui/Start/index.module.scss
+1
-1
No files found.
neos-assets/neos-logo.svg
View file @
679c2d85
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/ui/Duel/PlayMat/Menu/index.module.scss
View file @
679c2d85
...
@@ -11,3 +11,7 @@
...
@@ -11,3 +11,7 @@
border-radius
:
6px
;
border-radius
:
6px
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
:global
(
.ant-dropdown-menu-item
)
{
gap
:
8px
;
}
src/ui/Duel/PlayMat/Menu/index.tsx
View file @
679c2d85
...
@@ -2,8 +2,8 @@ import {
...
@@ -2,8 +2,8 @@ import {
ArrowRightOutlined
,
ArrowRightOutlined
,
CheckOutlined
,
CheckOutlined
,
CloseCircleFilled
,
CloseCircleFilled
,
createFromIconfontCN
,
MessageFilled
,
MessageFilled
,
SettingOutlined
,
StepForwardFilled
,
StepForwardFilled
,
}
from
"
@ant-design/icons
"
;
}
from
"
@ant-design/icons
"
;
import
{
import
{
...
@@ -25,11 +25,15 @@ import {
...
@@ -25,11 +25,15 @@ import {
sendSurrender
,
sendSurrender
,
ygopro
,
ygopro
,
}
from
"
@/api
"
;
}
from
"
@/api
"
;
import
{
cardStore
,
matStore
}
from
"
@/stores
"
;
import
{
cardStore
,
ChainSetting
,
matStore
}
from
"
@/stores
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
import
PhaseType
=
ygopro
.
StocGameMessage
.
MsgNewPhase
.
PhaseType
;
import
PhaseType
=
ygopro
.
StocGameMessage
.
MsgNewPhase
.
PhaseType
;
const
IconFont
=
createFromIconfontCN
({
scriptUrl
:
[
"
//at.alicdn.com/t/c/font_4188978_z6f9ellbtoc.js
"
],
});
const
{
phase
}
=
matStore
;
const
{
phase
}
=
matStore
;
const
{
useToken
}
=
theme
;
const
{
useToken
}
=
theme
;
export
const
Menu
=
()
=>
{
export
const
Menu
=
()
=>
{
...
@@ -38,8 +42,7 @@ export const Menu = () => {
...
@@ -38,8 +42,7 @@ export const Menu = () => {
const
enableBp
=
snapPhase
.
enableBp
;
const
enableBp
=
snapPhase
.
enableBp
;
const
enableM2
=
snapPhase
.
enableM2
;
const
enableM2
=
snapPhase
.
enableM2
;
const
enableEp
=
snapPhase
.
enableEp
;
const
enableEp
=
snapPhase
.
enableEp
;
const
{
currentPlayer
}
=
useSnapshot
(
matStore
);
const
{
currentPlayer
,
chainSetting
}
=
useSnapshot
(
matStore
);
const
{
chainSetting
}
=
useSnapshot
(
matStore
);
const
clearAllIdleInteractivities
=
()
=>
{
const
clearAllIdleInteractivities
=
()
=>
{
for
(
const
card
of
cardStore
.
inner
)
{
for
(
const
card
of
cardStore
.
inner
)
{
...
@@ -110,15 +113,21 @@ export const Menu = () => {
...
@@ -110,15 +113,21 @@ export const Menu = () => {
danger
:
phase
===
PhaseType
.
END
,
danger
:
phase
===
PhaseType
.
END
,
}));
}));
const
chainSettingTexts
=
[
"
全部连锁
"
,
"
忽略连锁
"
,
"
智能连锁
"
];
const
chainSettingTexts
=
[
const
chainSettingItems
:
MenuProps
[
"
items
"
]
=
chainSettingTexts
[
ChainSetting
.
CHAIN_ALL
,
"
全部连锁
"
],
.
map
((
text
,
i
)
=>
({
[
ChainSetting
.
CHAIN_IGNORE
,
"
忽略连锁
"
],
[
ChainSetting
.
CHAIN_SMART
,
"
智能连锁
"
],
]
as
const
;
const
chainSettingItems
:
MenuProps
[
"
items
"
]
=
chainSettingTexts
.
map
(
([
key
,
text
])
=>
({
label
:
text
,
label
:
text
,
icon
:
<
ChainIcon
chainSetting=
{
key
}
/>,
key
,
onClick
:
()
=>
{
onClick
:
()
=>
{
matStore
.
chainSetting
=
i
;
matStore
.
chainSetting
=
key
;
},
},
})
)
})
.
map
((
item
,
i
)
=>
({
key
:
i
,
...
item
})
);
);
const
surrenderMenuItems
:
MenuProps
[
"
items
"
]
=
[
const
surrenderMenuItems
:
MenuProps
[
"
items
"
]
=
[
{
{
...
@@ -148,14 +157,14 @@ export const Menu = () => {
...
@@ -148,14 +157,14 @@ export const Menu = () => {
</
Button
>
</
Button
>
</
DropdownWithTitle
>
</
DropdownWithTitle
>
<
DropdownWithTitle
<
DropdownWithTitle
title=
{
chainSettingTexts
[
chainSetting
]
}
menu=
{
{
menu=
{
{
items
:
chainSettingItems
,
items
:
chainSettingItems
,
selectable
:
true
,
defaultSelectedKeys
:
[
"
3
"
],
}
}
}
}
>
>
<
Button
icon=
{
<
SettingOutlined
/>
}
type=
"text"
></
Button
>
<
Button
icon=
{
<
ChainIcon
chainSetting=
{
chainSetting
}
/>
}
type=
"text"
></
Button
>
</
DropdownWithTitle
>
</
DropdownWithTitle
>
<
Tooltip
title=
"聊天室"
>
<
Tooltip
title=
"聊天室"
>
<
Button
icon=
{
<
MessageFilled
/>
}
type=
"text"
></
Button
>
<
Button
icon=
{
<
MessageFilled
/>
}
type=
"text"
></
Button
>
...
@@ -170,7 +179,7 @@ export const Menu = () => {
...
@@ -170,7 +179,7 @@ export const Menu = () => {
);
);
};
};
const
DropdownWithTitle
:
React
.
FC
<
DropdownProps
&
{
title
:
string
}
>
=
(
const
DropdownWithTitle
:
React
.
FC
<
DropdownProps
&
{
title
?
:
string
}
>
=
(
props
props
)
=>
{
)
=>
{
const
{
token
}
=
useToken
();
const
{
token
}
=
useToken
();
...
@@ -187,17 +196,37 @@ const DropdownWithTitle: React.FC<DropdownProps & { title: string }> = (
...
@@ -187,17 +196,37 @@ const DropdownWithTitle: React.FC<DropdownProps & { title: string }> = (
{
...
props
}
{
...
props
}
dropdownRender=
{
(
menu
)
=>
(
dropdownRender=
{
(
menu
)
=>
(
<
div
style=
{
contentStyle
}
>
<
div
style=
{
contentStyle
}
>
<
Space
style=
{
{
padding
:
"
12px 16px
"
}
}
>
{
props
.
title
}
</
Space
>
{
props
.
title
&&
(
<
Divider
style=
{
{
margin
:
0
}
}
/>
<>
<
Space
style=
{
{
padding
:
"
12px 16px
"
,
fontSize
:
12
}
}
>
{
props
.
title
}
</
Space
>
<
Divider
style=
{
{
margin
:
0
}
}
/>
</>
)
}
{
cloneElement
(
menu
as
React
.
ReactElement
,
{
{
cloneElement
(
menu
as
React
.
ReactElement
,
{
style
:
menuStyle
,
style
:
menuStyle
,
})
}
})
}
</
div
>
</
div
>
)
}
)
}
arrow
arrow
trigger=
{
[
"
click
"
,
"
hover
"
]
}
trigger=
{
[
"
click
"
]
}
>
>
{
props
.
children
}
{
props
.
children
}
</
Dropdown
>
</
Dropdown
>
);
);
};
};
const
ChainIcon
:
React
.
FC
<
{
chainSetting
:
ChainSetting
}
>
=
({
chainSetting
,
})
=>
{
switch
(
chainSetting
)
{
case
ChainSetting
.
CHAIN_ALL
:
return
<
IconFont
type=
"icon-chain-all"
/>;
case
ChainSetting
.
CHAIN_SMART
:
return
<
IconFont
type=
"icon-chain"
/>;
case
ChainSetting
.
CHAIN_IGNORE
:
default
:
return
<
IconFont
type=
"icon-chain-broken"
/>;
}
};
src/ui/Start/index.module.scss
View file @
679c2d85
body
{
body
{
background
:
#0f131e
;
background
:
#0f131e
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
...
@@ -13,6 +12,7 @@ body * {
...
@@ -13,6 +12,7 @@ body * {
.wrapper
{
.wrapper
{
position
:
relative
;
position
:
relative
;
text-align
:
center
;
}
}
.wrapper
>
*
{
.wrapper
>
*
{
...
...
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