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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
e273124f
Commit
e273124f
authored
Mar 18, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize waiting hint
parent
65264fb4
Pipeline
#20780
passed with stages
in 14 minutes and 43 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
neos.config.json
neos.config.json
+3
-0
neos.config.prod.json
neos.config.prod.json
+3
-0
src/ui/Duel/hintNotification.tsx
src/ui/Duel/hintNotification.tsx
+13
-1
src/ui/Duel/status.tsx
src/ui/Duel/status.tsx
+1
-2
No files found.
neos.config.json
View file @
e273124f
...
...
@@ -66,6 +66,9 @@
"avatarSize"
:
40
,
"meAvatarColor"
:
"#0e63e1"
,
"opAvatarColor"
:
"#e10e68"
},
"hint"
:
{
"waitingDuration"
:
1.5
}
}
}
neos.config.prod.json
View file @
e273124f
...
...
@@ -66,6 +66,9 @@
"avatarSize"
:
40
,
"meAvatarColor"
:
"#0e63e1"
,
"opAvatarColor"
:
"#e10e68"
},
"hint"
:
{
"waitingDuration"
:
1.5
}
}
}
src/ui/Duel/hintNotification.tsx
View file @
e273124f
...
...
@@ -3,15 +3,17 @@ import { useAppSelector } from "../../hook";
import
{
selectMeHint
,
selectOpHint
}
from
"
../../reducers/duel/hintSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../reducers/duel/phaseSlice
"
;
import
{
notification
}
from
"
antd
"
;
import
{
selectDuelResult
}
from
"
../../reducers/duel/mod
"
;
import
{
selectDuelResult
,
selectWaiting
}
from
"
../../reducers/duel/mod
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
const
HintNotification
=
()
=>
{
const
meHint
=
useAppSelector
(
selectMeHint
);
const
opHint
=
useAppSelector
(
selectOpHint
);
const
currentPhase
=
useAppSelector
(
selectCurrentPhase
);
const
waiting
=
useAppSelector
(
selectWaiting
);
const
result
=
useAppSelector
(
selectDuelResult
);
const
navigate
=
useNavigate
();
...
...
@@ -43,6 +45,16 @@ const HintNotification = () => {
}
},
[
currentPhase
]);
useEffect
(()
=>
{
if
(
waiting
)
{
api
.
info
({
message
:
"
...等待对方行动中...
"
,
placement
:
"
top
"
,
duration
:
NeosConfig
.
ui
.
hint
.
waitingDuration
,
});
}
},
[
waiting
]);
useEffect
(()
=>
{
if
(
result
)
{
const
message
=
...
...
src/ui/Duel/status.tsx
View file @
e273124f
...
...
@@ -19,14 +19,13 @@ const OP_VALUE = "opponent";
const
PlayerStatus
=
()
=>
{
const
meInfo
=
useAppSelector
(
selectMeInitInfo
);
const
opInfo
=
useAppSelector
(
selectOpInitInfo
);
const
myTurn
=
useAppSelector
(
selectCurrentPlayerIsMe
);
const
waiting
=
useAppSelector
(
selectWaiting
)
||
false
;
return
(
<
CheckCard
.
Group
bordered
style=
{
{
height
:
`${NeosConfig.ui.layout.header.height}`
}
}
value=
{
myTurn
||
!
waiting
?
ME_VALUE
:
OP
_VALUE
}
value=
{
waiting
?
OP_VALUE
:
ME
_VALUE
}
>
<
CheckCard
avatar=
{
...
...
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