Commit 651818a2 authored by Chunchi Che's avatar Chunchi Che

update

parent 201e3158
Pipeline #21105 failed with stages
in 6 minutes and 37 seconds
......@@ -64,7 +64,7 @@ export const fetchEsHintMeta = createAsyncThunk(
const location = param.location;
if (param.cardID) {
const cardMeta = await fetchCard(param.cardID);
const cardMeta = await fetchCard(param.cardID, true);
return { originMsg, cardMeta, location };
} else {
......
......@@ -18,7 +18,7 @@ export default (hint: MsgHint, dispatch: AppDispatch) => {
break;
}
case MsgHint.HintType.HINT_SELECTMSG: {
dispatch(fetchSelectHintMeta({ selectHintData: hint.hint_data }));
dispatch(fetchSelectHintMeta({ selectHintData: hint.hint_data, esHint: "" }));
break;
}
default: {
......
......@@ -6,5 +6,5 @@ export default (
_: ygopro.StocGameMessage.MsgSpSummoned,
dispatch: AppDispatch
) => {
dispatch(fetchEsHintMeta({ originMsg: 1604 }));
dispatch(fetchEsHintMeta({ originMsg: 1606 }));
};
......@@ -34,8 +34,9 @@ const CheckCardModal = () => {
const cancelResponse = useAppSelector(selectCheckCardModalCacnelResponse);
const [response, setResponse] = useState<number[]>([]);
const defaultValue: number[] = [];
const selectHintMsg =
useAppSelector(selectHint)?.esSelectHint || "请选择卡片";
const hint = useAppSelector(selectHint);
const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
// TODO: 这里可以考虑更好地封装
const sendResponseHandler = (
......@@ -58,7 +59,7 @@ const CheckCardModal = () => {
return (
<DragModal
title={`${selectHintMsg} ${min}-${max}`}
title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
......@@ -33,8 +33,9 @@ const CheckCardModalV2 = () => {
);
const selectedOptions = useAppSelector(selectCheckCardModalV2SelectedOptions);
const responseable = useAppSelector(selectCheckCardModalV2ResponseAble);
const selectHintMsg =
useAppSelector(selectHint)?.esSelectHint || "请选择卡片";
const hint = useAppSelector(selectHint);
const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
const onFinishOrCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true });
......@@ -45,7 +46,7 @@ const CheckCardModalV2 = () => {
return (
<DragModal
title={`${selectHintMsg} ${min}-${max}`}
title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
......@@ -33,8 +33,9 @@ const CheckCardModalV3 = () => {
.concat(selectedOptions)
.map((option) => option.level2)
.reduce((sum, current) => sum + current, 0);
const selectHintMsg =
useAppSelector(selectHint)?.esSelectHint || "请选择卡片";
const hint = useAppSelector(selectHint);
const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
const responseable =
(overflow
......@@ -53,7 +54,7 @@ const CheckCardModalV3 = () => {
return (
<DragModal
title={`${selectHintMsg} ${min}-${max}`}
title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
......@@ -9,15 +9,18 @@ import {
} from "../../reducers/duel/modal/mod";
import { setYesNoModalIsOpen } from "../../reducers/duel/mod";
import DragModal from "./dragModal";
import { selectHint } from "../../reducers/duel/hintSlice";
const YesNoModal = () => {
const dispatch = store.dispatch;
const isOpen = useAppSelector(selectYesNoModalIsOpen);
const msg = useAppSelector(selectYesNOModalMsg);
const hint = useAppSelector(selectHint);
const preHintMsg = hint?.esHint || "";
return (
<DragModal
title={msg}
title={`${preHintMsg} ${msg}`}
open={isOpen}
closable={false}
footer={
......
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