Commit 0d6af302 authored by Chunchi Che's avatar Chunchi Che

update

parent 89281266
Pipeline #23190 passed with stages
in 11 minutes and 15 seconds
......@@ -7,8 +7,6 @@ export enum SideStage {
NONE = 0, // 没有进入SIDE阶段
SIDE_CHANGING = 1, // 正在更换副卡组
SIDE_CHANGED = 2, // 副卡组更换完毕
HAND_SELECTING = 3, // 选择猜拳中
HAND_SELECTED = 4, // 猜拳选择完毕
TP_SELECTING = 5, // 正在选边
TP_SELECTED = 6, // 选边完成
DUEL_START = 7, // 决斗开始
......
......@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
import { resetUniverse } from "@/stores";
import { ChangeSideModal } from "../Side";
import { ChangeSideModal, TpModal } from "../Side";
import {
Alert,
AnnounceModal,
......@@ -48,6 +48,7 @@ export const Component: React.FC = () => {
<SimpleSelectCardsModal />
<EndModal />
<ChangeSideModal />
<TpModal />
</>
);
};
......
import React from "react";
export const MoraTpModal: React.FC = () => {
return <></>;
};
.container {
display: flex;
align-items: center;
flex-direction: column;
}
import { Modal } from "antd";
import React from "react";
import { useSnapshot } from "valtio";
import { sendTpResult } from "@/api";
import { SideStage, sideStore } from "@/stores";
import { IconFont } from "@/ui/Shared";
import { Tp, TpPopover } from "@/ui/WaitRoom/Popover";
import styles from "./index.module.scss";
export const TpModal: React.FC = () => {
const { stage } = useSnapshot(sideStore);
return (
<Modal centered open={stage === SideStage.TP_SELECTING}>
<div className={styles.container}>
<TpPopover
onSelect={(tp) => {
sendTpResult(tp === Tp.First);
sideStore.stage = SideStage.TP_SELECTED;
}}
>
<>
<IconFont type="icon-one" size={18} />
<span>请选择先后手</span>
</>
</TpPopover>
</div>
</Modal>
);
};
export * from "./ChangeSideModal";
export * from "./MoraTpModal";
export * from "./TpModal";
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