Commit 2c8593f1 authored by timel's avatar timel

refactor: 70%

parent d4ce1437
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
row-gap: 10px; row-gap: 10px;
} }
.card-modal-info { .info {
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
height: 204px; // TODO - fix this height: 204px; // TODO - fix this
......
...@@ -75,7 +75,7 @@ export const CardModal = () => { ...@@ -75,7 +75,7 @@ export const CardModal = () => {
width={CARD_WIDTH} width={CARD_WIDTH}
style={{ borderRadius: 4 }} style={{ borderRadius: 4 }}
/> />
<Space direction="vertical" className="card-modal-info"> <Space direction="vertical" className={styles.info}>
<AtkLine atk={atk} def={def} /> <AtkLine atk={atk} def={def} />
<AttLine <AttLine
types={extraCardTypes(types || 0)} types={extraCardTypes(types || 0)}
...@@ -89,26 +89,6 @@ export const CardModal = () => { ...@@ -89,26 +89,6 @@ export const CardModal = () => {
</Space> </Space>
<Divider style={{ margin: "14px 0" }}></Divider> <Divider style={{ margin: "14px 0" }}></Divider>
<Desc desc={desc} /> <Desc desc={desc} />
{/* {nonEffectInteractivies.map((interactive, idx) => {
return (
<button
key={idx}
className="card-modal-btn"
onClick={() => {
sendSelectIdleCmdResponse(interactive.response);
cardModal.isOpen = false;
// 清空互动性
for (const card of cardStore.inner) {
card.idleInteractivities = [];
}
}}
>
{interactive.desc}
</button>
);
})}
<EffectButton meta={meta} effectInteractivies={effectInteractivies} /> */}
</div> </div>
</Drawer> </Drawer>
); );
...@@ -129,7 +109,7 @@ const AttLine = (props: { ...@@ -129,7 +109,7 @@ const AttLine = (props: {
.map((t) => fetchStrings("!system", Type2StringCodeMap.get(t) || 0)) .map((t) => fetchStrings("!system", Type2StringCodeMap.get(t) || 0))
.join("/"); .join("/");
return ( return (
<div className="attline"> <div className={styles.attline}>
{attribute && <Tag>{attribute}</Tag>} {attribute && <Tag>{attribute}</Tag>}
{race && <Tag>{race}</Tag>} {race && <Tag>{race}</Tag>}
{types && <Tag>{types}</Tag>} {types && <Tag>{types}</Tag>}
...@@ -138,14 +118,14 @@ const AttLine = (props: { ...@@ -138,14 +118,14 @@ const AttLine = (props: {
}; };
const AtkLine = (props: { atk?: number; def?: number }) => ( const AtkLine = (props: { atk?: number; def?: number }) => (
<Space size={10} className="atkLine" direction="vertical"> <Space size={10} className={styles.atkLine} direction="vertical">
<div> <div>
<div className="title">ATK</div> <div className={styles.title}>ATK</div>
<div className="number">{props.atk ?? "?"}</div> <div className={styles.number}>{props.atk ?? "?"}</div>
</div> </div>
<div> <div>
<div className="title">DEF</div> <div className={styles.title}>DEF</div>
<div className="number">{props.def ?? "?"}</div> <div className={styles.number}>{props.def ?? "?"}</div>
</div> </div>
</Space> </Space>
); );
...@@ -164,7 +144,7 @@ const _CounterLine = (props: { counters: { [type: number]: number } }) => { ...@@ -164,7 +144,7 @@ const _CounterLine = (props: { counters: { [type: number]: number } }) => {
return ( return (
<> <>
{counters.map((counter) => ( {counters.map((counter) => (
<div className="card-modal-counter">{counter}</div> <div>{counter}</div>
))} ))}
</> </>
); );
......
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