Commit c60f9a6f authored by Chunchi Che's avatar Chunchi Che

fix

parent a6668f06
Pipeline #21095 failed with stages
in 4 minutes and 18 seconds
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
"opAvatarColor":"#e10e68" "opAvatarColor":"#e10e68"
}, },
"hint":{ "hint":{
"waitingDuration":1.5 "waitingDuration":1.5,
"maxCount": 3
} }
}, },
"unimplementedWhiteList":[ "unimplementedWhiteList":[
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
"opAvatarColor":"#e10e68" "opAvatarColor":"#e10e68"
}, },
"hint":{ "hint":{
"waitingDuration":1.5 "waitingDuration":1.5,
"maxCount": 3
} }
}, },
"unimplementedWhiteList":[ "unimplementedWhiteList":[
......
...@@ -35,16 +35,12 @@ const CheckCardModalV2 = () => { ...@@ -35,16 +35,12 @@ const CheckCardModalV2 = () => {
const responseable = useAppSelector(selectCheckCardModalV2ResponseAble); const responseable = useAppSelector(selectCheckCardModalV2ResponseAble);
const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片"; const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片";
const onFinish = () => { const onFinishOrCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true }); sendSelectUnselectCardResponse({ cancel_or_finish: true });
dispatch(setCheckCardModalV2IsOpen(false)); dispatch(setCheckCardModalV2IsOpen(false));
dispatch(resetCheckCardModalV2()); dispatch(resetCheckCardModalV2());
dispatch(setCheckCardModalV2ResponseAble(false)); dispatch(setCheckCardModalV2ResponseAble(false));
}; };
const onCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true });
dispatch(setCheckCardModalV2ResponseAble(false));
};
return ( return (
<DragModal <DragModal
...@@ -53,10 +49,16 @@ const CheckCardModalV2 = () => { ...@@ -53,10 +49,16 @@ const CheckCardModalV2 = () => {
closable={false} closable={false}
footer={ footer={
<> <>
<Button disabled={!finishable || !responseable} onClick={onFinish}> <Button
disabled={!finishable || !responseable}
onClick={onFinishOrCancel}
>
finish finish
</Button> </Button>
<Button disabled={!cancelable || !responseable} onClick={onCancel}> <Button
disabled={!cancelable || !responseable}
onClick={onFinishOrCancel}
>
cancel cancel
</Button> </Button>
</> </>
......
...@@ -17,7 +17,9 @@ const HintNotification = () => { ...@@ -17,7 +17,9 @@ const HintNotification = () => {
const result = useAppSelector(selectDuelResult); const result = useAppSelector(selectDuelResult);
const navigate = useNavigate(); const navigate = useNavigate();
const [api, contextHolder] = notification.useNotification(); const [api, contextHolder] = notification.useNotification({
maxCount: NeosConfig.ui.hint.maxCount,
});
useEffect(() => { useEffect(() => {
if (meHint && meHint.msg) { if (meHint && meHint.msg) {
api.info({ api.info({
...@@ -25,7 +27,7 @@ const HintNotification = () => { ...@@ -25,7 +27,7 @@ const HintNotification = () => {
placement: "bottom", placement: "bottom",
}); });
} }
}, [meHint]); }, [meHint?.msg]);
useEffect(() => { useEffect(() => {
if (opHint && opHint.msg) { if (opHint && opHint.msg) {
...@@ -34,7 +36,7 @@ const HintNotification = () => { ...@@ -34,7 +36,7 @@ const HintNotification = () => {
placement: "top", placement: "top",
}); });
} }
}, [opHint]); }, [opHint?.msg]);
useEffect(() => { useEffect(() => {
if (currentPhase) { if (currentPhase) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment