Commit bc8d435b authored by timel's avatar timel

fix: 暂时微调样式

parent 874b53b5
Pipeline #22854 failed with stages
in 11 minutes and 29 seconds
......@@ -225,9 +225,9 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
);
},
};
const items = [...nonEffectItem];
hasEffect && items.push(effectItem);
setDropdownMenu({ items });
setDropdownMenu({
items: [...nonEffectItem, ...(hasEffect ? [effectItem] : [])],
});
};
const onClick = () => {
......@@ -358,10 +358,13 @@ const handleEffectActivation = (
// <<< 下拉菜单 <<<
const call =
<Options,>(task: Task) =>
(uuid: string, options?: Options extends {} ? Options : never) =>
eventbus.call(task, uuid, options);
type CallReturn<Options> = Options extends {}
? (uuid: string, options?: Options) => Promise<void>
: (uuid: string) => Promise<void>;
const call = <Options,>(task: Task): CallReturn<Options> =>
((uuid: string, options?: Options) =>
eventbus.call(task, uuid, options)) as any;
export const callCardMove = call<MoveOptions>(Task.Move);
export const callCardFocus = call(Task.Focus);
......
......@@ -2,29 +2,21 @@ import { InteractType } from "@/stores";
export function interactTypeToString(t: InteractType): string {
switch (t) {
case InteractType.SUMMON: {
case InteractType.SUMMON:
return "普通召唤";
}
case InteractType.SP_SUMMON: {
case InteractType.SP_SUMMON:
return "特殊召唤";
}
case InteractType.POS_CHANGE: {
case InteractType.POS_CHANGE:
return "改变表示形式";
}
case InteractType.MSET: {
case InteractType.MSET:
return "前场放置";
}
case InteractType.SSET: {
case InteractType.SSET:
return "后场放置";
}
case InteractType.ACTIVATE: {
case InteractType.ACTIVATE:
return "发动效果";
}
case InteractType.ATTACK: {
case InteractType.ATTACK:
return "攻击";
}
default: {
default:
return "未知选项";
}
}
}
.account-header {
position: relative;
z-index: 200;
top: 0;
left: 0;
background: #28272d99;
border-bottom: 1px solid rgba(150, 150, 150, .2);
border-bottom: 1px solid rgba(150, 150, 150, 0.2);
width: 100%;
height: 40px;
height: 0;
.header-user {
position: absolute;
......@@ -16,7 +13,7 @@
align-items: center;
img {
margin: 0 .5rem;
margin: 0 0.5rem;
}
.header-user-btn {
......@@ -24,23 +21,16 @@
}
.sep {
margin: 0 .8rem;
margin: 0 0.8rem;
}
}
}
.account-header > div:first-child {
display: inline-block;
position: absolute;
left: 2%;
top: 0;
}
.container {
position: relative;
display: flex;
width: 100%;
height: 95vh;
height: calc(100vh - 48px);
align-items: center;
.bg {
......@@ -48,7 +38,7 @@
height: 100%;
background: url(/neos-assets/home-background.png);
background-size: cover;
opacity: .2;
opacity: 0.2;
}
.box {
......@@ -61,9 +51,9 @@
top: 50%;
transform: translate(-50%, -50%);
background: #333b51;
opacity: .8;
opacity: 0.8;
border-radius: 1.2em;
box-shadow: 0 2px 10px -5px rgba(9,2,4,.8);
box-shadow: 0 2px 10px -5px rgba(9, 2, 4, 0.8);
align-items: center;
p {
......@@ -74,10 +64,11 @@
font-size: 1.2em;
width: 350px;
height: 45px;
margin: .5em;
margin: 0.5em;
background-color: #2c2c2c;
border-width: .3em;
border-width: 0.3em;
border-image: url(/neos-assets/border.webp) 10;
color: white;
}
button:hover {
......
......@@ -54,13 +54,6 @@ const Home: React.FC = () => {
return (
<>
<div className={styles["account-header"]}>
<div>
<img
src={`${NeosConfig.assetsPath}/neos-logo.svg`}
alt="NEOS"
height={80}
/>
</div>
<div className={styles["header-user"]}>
<img
src={
......
......@@ -19,7 +19,7 @@ export const NeosLayout = () => {
<NavLink to="/match">匹配</NavLink>
<NavLink to="/build">组卡</NavLink>
<span style={{ flexGrow: 1 }} />
<NavLink to="/home">我的</NavLink>
<NavLink to="/home">个人中心</NavLink>
</nav>
<Outlet />
</>
......
.hint {
font-size: 20px;
font-family: "Gill Sans", sans-serif;
text-shadow: #FC0 1px 0 10px;
color: white;
text-align: center;
margin-top: 100px;
}
......@@ -20,7 +20,6 @@ const SSO: React.FC = () => {
useEffect(() => {
if (!sso) {
const ssoUrl = getSSOUrl(location.href);
window.location.href = ssoUrl;
}
......@@ -32,10 +31,8 @@ const SSO: React.FC = () => {
}, []);
return (
<div>
<p className={styles.hint}>
{logined ? "登录成功,正在跳转。。" : "登录萌卡账号中。。。"}
</p>
<div className={styles.hint}>
{logined ? "登录成功,正在跳转......" : "登录萌卡账号中......"}
</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