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