Commit bb528856 authored by Chunchi Che's avatar Chunchi Che

adjust modal styles

parent 8e5faaef
Pipeline #23548 passed with stages
in 17 minutes and 52 seconds
...@@ -8,7 +8,8 @@ import { YgoCard } from "@/ui/Shared"; ...@@ -8,7 +8,8 @@ import { YgoCard } from "@/ui/Shared";
import { showCardModal } from "./CardModal"; import { showCardModal } from "./CardModal";
const CARD_WIDTH = 100; const CARD_WIDTH = "6.25rem";
const DRAWER_WIDTH = "10rem";
// TODO: 显示的位置还需要细细斟酌 // TODO: 显示的位置还需要细细斟酌
...@@ -46,7 +47,7 @@ export const CardListModal = () => { ...@@ -46,7 +47,7 @@ export const CardListModal = () => {
open={isOpen} open={isOpen}
onClose={handleOkOrCancel} onClose={handleOkOrCancel}
// headerStyle={{ display: "none" }} // headerStyle={{ display: "none" }}
width={CARD_WIDTH + 66} width={DRAWER_WIDTH}
style={{ maxHeight: "100%" }} style={{ maxHeight: "100%" }}
mask={false} mask={false}
> >
......
.desc { .desc {
line-height: 1.6; line-height: 1.6;
font-size: 14px; font-size: 0.875rem;
max-height: calc(100% - 237px); max-height: calc(100% - 14.8rem);
.maro-item { .maro-item {
display: flex; display: flex;
gap: 8px; gap: 0.5rem;
} }
} }
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
} }
.drawer { .drawer {
width: 90% !important; width: 20vw !important;
left: 10%; left: 10%;
--height: 640px; --height: 40rem;
top: calc((100% - var(--height)) / 2); top: calc((100% - var(--height)) / 2);
height: var(--height) !important; height: var(--height) !important;
position: relative; position: relative;
border-radius: 6px; border-radius: 0.375rem;
background: #242424; background: #242424;
:global(.ant-drawer-header) { :global(.ant-drawer-header) {
padding: 15px 0; padding: 1rem 0;
:global(.ant-drawer-header-title) { :global(.ant-drawer-header-title) {
flex-direction: row-reverse; flex-direction: row-reverse;
padding-left: 24px; padding-left: 1.5rem;
} }
} }
} }
...@@ -34,19 +34,19 @@ ...@@ -34,19 +34,19 @@
font-family: var(--theme-font); font-family: var(--theme-font);
} }
.number { .number {
font-size: 30px; font-size: 1.875rem;
line-height: 36px; line-height: 2.25rem;
} }
} }
.attline { .attline {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
row-gap: 10px; row-gap: 0.625rem;
} }
.info { .info {
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
height: 230px; // TODO - fix this height: 15rem; // TODO - fix this
} }
...@@ -16,7 +16,7 @@ import { ...@@ -16,7 +16,7 @@ import {
import { Desc } from "./Desc"; import { Desc } from "./Desc";
import styles from "./index.module.scss"; import styles from "./index.module.scss";
const CARD_WIDTH = 140; const CARD_WIDTH = "8.75rem";
const defaultStore = { const defaultStore = {
isOpen: false, isOpen: false,
...@@ -86,7 +86,7 @@ export const CardModal = () => { ...@@ -86,7 +86,7 @@ export const CardModal = () => {
{/* TODO: 展示星级/LINK数 */} {/* TODO: 展示星级/LINK数 */}
</Space> </Space>
</Space> </Space>
<Divider style={{ margin: "14px 0" }}></Divider> <Divider style={{ margin: "0.875rem 0" }}></Divider>
<Desc desc={desc} /> <Desc desc={desc} />
</div> </div>
</Drawer> </Drawer>
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
text-align: center; text-align: center;
.result { .result {
font-size: 30px; font-size: 1.875rem;
font-family: var(--theme-font); font-family: var(--theme-font);
color: var(--text-color); color: var(--text-color);
} }
.reason { .reason {
font-size: 20px; font-size: 1.25rem;
font-family: var(--theme-font); font-family: var(--theme-font);
} }
} }
...@@ -72,7 +72,7 @@ export const OptionModal = () => { ...@@ -72,7 +72,7 @@ export const OptionModal = () => {
style={{ style={{
display: "grid", display: "grid",
gridTemplateColumns: "repeat(2, 1fr)", gridTemplateColumns: "repeat(2, 1fr)",
gap: "10px", gap: "0.625rem",
}} }}
onChange={(values: any) => { onChange={(values: any) => {
const v = selecteds.map((x, i) => (i === page ? values : x)); const v = selecteds.map((x, i) => (i === page ? values : x));
...@@ -83,7 +83,8 @@ export const OptionModal = () => { ...@@ -83,7 +83,8 @@ export const OptionModal = () => {
<CheckCard <CheckCard
key={idx} key={idx}
style={{ style={{
width: "200px", width: "12.5rem",
fontSize: "1rem",
marginInlineEnd: 0, marginInlineEnd: 0,
marginBlockEnd: 0, marginBlockEnd: 0,
}} }}
...@@ -108,7 +109,7 @@ const Selector: React.FC<{ ...@@ -108,7 +109,7 @@ const Selector: React.FC<{
<Segmented <Segmented
block block
options={Array.from({ length: maxPage }).map((_, idx) => idx)} options={Array.from({ length: maxPage }).map((_, idx) => idx)}
style={{ margin: "10px 0" }} style={{ margin: "0.625rem 0" }}
value={page} value={page}
onChange={onChange as any} onChange={onChange as any}
></Segmented> ></Segmented>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
top: 50%; top: 50%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 10px; padding: 0 0.625rem;
box-sizing: border-box; box-sizing: border-box;
height: 0; height: 0;
button { button {
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
} }
:global(.ant-pro-checkcard) { :global(.ant-pro-checkcard) {
border-radius: 4px; border-radius: 0.25rem;
overflow: hidden; overflow: hidden;
} }
// 多选卡片的样式 // 多选卡片的样式
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
.check-group { .check-group {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(5, 1fr);
gap: 10px; gap: 0.625rem;
} }
.check-card { .check-card {
width: 100px; width: 6.25rem;
aspect-ratio: var(--card-ratio); aspect-ratio: var(--card-ratio);
margin-inline-end: 0; margin-inline-end: 0;
margin-block-end: 0; margin-block-end: 0;
......
...@@ -110,7 +110,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({ ...@@ -110,7 +110,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
<span>{single ? "每次选择一张" : ""}</span> <span>{single ? "每次选择一张" : ""}</span>
</> </>
} // TODO: 这里可以再细化一些 } // TODO: 这里可以再细化一些
width={600} width={"37.5rem"}
okButtonProps={{ okButtonProps={{
disabled: !submitable, disabled: !submitable,
}} }}
......
...@@ -114,7 +114,7 @@ const SortableItem = (props: { id: number; meta: CardMeta }) => { ...@@ -114,7 +114,7 @@ const SortableItem = (props: { id: number; meta: CardMeta }) => {
return ( return (
<div ref={setNodeRef} style={style} {...attributes} {...listeners}> <div ref={setNodeRef} style={style} {...attributes} {...listeners}>
<Card <Card
style={{ width: 100 }} style={{ width: "6.25rem" }}
cover={ cover={
<img <img
alt={props.meta.id.toString()} alt={props.meta.id.toString()}
......
...@@ -25,7 +25,7 @@ export const YesNoModal: React.FC = () => { ...@@ -25,7 +25,7 @@ export const YesNoModal: React.FC = () => {
<NeosModal <NeosModal
title={`${preHintMsg} ${msg}`} title={`${preHintMsg} ${msg}`}
open={isOpen} open={isOpen}
width={400} width={"25rem"}
afterClose={() => (matStore.hint.esHint = undefined)} afterClose={() => (matStore.hint.esHint = undefined)}
footer={ footer={
<> <>
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
position: fixed; position: fixed;
display: flex; display: flex;
// flex-direction: column; // flex-direction: column;
gap: 6px; gap: 0.375rem;
bottom: 20px; bottom: 1.25rem;
right: 35px; right: 2.2rem;
z-index: 999; z-index: 999;
background-color: #323232; background-color: #323232;
padding: 8px; padding: 0.5rem;
border-radius: 6px; border-radius: 0.375rem;
overflow: hidden; overflow: hidden;
} }
:global(.ant-dropdown-menu-item) { :global(.ant-dropdown-menu-item) {
gap: 8px; gap: 0.5rem;
} }
...@@ -11,7 +11,7 @@ interface Props { ...@@ -11,7 +11,7 @@ interface Props {
code?: number; code?: number;
// cardName?: string; // cardName?: string;
style?: CSSProperties; style?: CSSProperties;
width?: number; width?: number | string;
onClick?: () => void; onClick?: () => void;
onLoad?: () => void; onLoad?: () => void;
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: row; flex-direction: row;
gap: 80px; gap: 5rem;
button { button {
width: 100px; width: 6.25rem;
height: 50px; height: 3rem;
font-size: 16px; font-size: 1rem;
} }
} }
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