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
71744c0f
Commit
71744c0f
authored
May 08, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize notification style
parent
9fba97a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
src/ui/Duel/Message/DragModal.tsx
src/ui/Duel/Message/DragModal.tsx
+2
-2
src/ui/Duel/Message/HintNotification.tsx
src/ui/Duel/Message/HintNotification.tsx
+15
-6
No files found.
src/ui/Duel/Message/DragModal.tsx
View file @
71744c0f
...
...
@@ -6,7 +6,7 @@ import Draggable from "react-draggable";
export
interface
DragModalProps
extends
ModalProps
{}
const
S
tyle
=
{
const
s
tyle
=
{
borderStyle
:
"
groove
"
,
borderRadius
:
"
8px
"
,
backgroundColor
:
"
#303030
"
,
...
...
@@ -39,7 +39,7 @@ export const DragModal = (props: DragModalProps) => {
{
...
props
}
modalRender=
{
(
modal
)
=>
(
<
Draggable
bounds=
{
bounds
}
onStart=
{
onStart
}
>
<
div
ref=
{
dragRef
}
style=
{
S
tyle
}
>
<
div
ref=
{
dragRef
}
style=
{
s
tyle
}
>
{
modal
}
</
div
>
</
Draggable
>
...
...
src/ui/Duel/Message/HintNotification.tsx
View file @
71744c0f
...
...
@@ -7,6 +7,12 @@ import { ygopro } from "@/api";
import
{
useConfig
}
from
"
@/config
"
;
import
{
matStore
}
from
"
@/stores
"
;
const
style
=
{
borderStyle
:
"
groove
"
,
borderRadius
:
"
8px
"
,
backgroundColor
:
"
#303030
"
,
};
const
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
const
NeosConfig
=
useConfig
();
...
...
@@ -19,34 +25,36 @@ export const HintNotification = () => {
const
result
=
snap
.
result
;
const
navigate
=
useNavigate
();
const
[
api
,
contextHolder
]
=
notification
.
useNotification
({
maxCount
:
NeosConfig
.
ui
.
hint
.
maxCount
,
});
useEffect
(()
=>
{
if
(
hintState
&&
hintState
.
msg
)
{
api
.
info
({
api
.
open
({
message
:
`
${
hintState
.
msg
}
`
,
placement
:
"
bottom
"
,
placement
:
"
topLeft
"
,
style
:
style
,
});
}
},
[
hintState
.
msg
]);
useEffect
(()
=>
{
if
(
currentPhase
)
{
api
.
info
({
api
.
open
({
message
:
`<当前阶段>
${
currentPhase
}
`
,
placement
:
"
topRight
"
,
style
:
style
,
});
}
},
[
currentPhase
]);
useEffect
(()
=>
{
if
(
waiting
)
{
api
.
info
({
api
.
open
({
message
:
"
...等待对方行动中...
"
,
placement
:
"
top
"
,
duration
:
NeosConfig
.
ui
.
hint
.
waitingDuration
,
style
:
style
,
});
}
},
[
waiting
]);
...
...
@@ -59,9 +67,10 @@ export const HintNotification = () => {
:
MsgWin
.
ActionType
.
Defeated
?
"
失败
"
:
"
未知结果
"
;
api
.
info
({
api
.
open
({
message
,
placement
:
"
bottom
"
,
style
:
style
,
onClose
()
{
navigate
(
"
/
"
);
},
...
...
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