Commit 17edc027 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/build_deck' into 'main'

Fix build deck styles

See merge request !396
parents bfeee3f7 5cb76936
Pipeline #28647 passed with stages
in 14 minutes and 23 seconds
......@@ -2794,9 +2794,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001587",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz",
"integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==",
"version": "1.0.30001643",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz",
"integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==",
"funding": [
{
"type": "opencollective",
......@@ -9153,9 +9153,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001587",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz",
"integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA=="
"version": "1.0.30001643",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz",
"integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg=="
},
"chalk": {
"version": "4.1.2",
......
......@@ -242,7 +242,7 @@ export const DeckEditor: React.FC<{
<Space className={styles.title}>
<Input
placeholder={i18n("EnterTheDeckName")}
bordered={false}
variant="borderless"
prefix={<EditOutlined />}
style={{ width: "8.8rem" }}
onChange={(e) => setDeckName(e.target.value)}
......
......@@ -67,6 +67,12 @@ const matConfigWithUnit = Object.entries(_matConfigWithUnit).map(
([k, [value, unit]]) => [k, pxTransform(value, unit) as [number, UNIT]],
) satisfies CSSConfig;
export function setCssProperties() {
toCssProperties(matConfigWithUnit).forEach(([k, v]) => {
document.body.style.setProperty(k, v);
});
}
export const matConfig = matConfigWithUnit.reduce(
(prev, [key, value]) => ({
...prev,
......@@ -75,7 +81,3 @@ export const matConfig = matConfigWithUnit.reduce(
}),
{} as Record<keyof typeof _matConfigWithUnit, number>,
);
toCssProperties(matConfigWithUnit).forEach(([k, v]) => {
document.body.style.setProperty(k, v);
});
......@@ -40,6 +40,7 @@ import {
initSuper,
initWASM,
} from "./utils";
import { setCssProperties } from "../Duel/PlayMat/css";
const NeosConfig = useConfig();
......@@ -51,6 +52,10 @@ export const loader: LoaderFunction = async () => {
initForbidden();
initI18N();
initSuper();
// set some styles
setCssProperties();
return null;
};
......
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