fix(gui): breaking change by daisyui

dumb-splashcat-thing^2
spacemeowx2 2023-07-04 19:40:22 +08:00 committed by imspace
parent 740259e156
commit 8707feac01
6 changed files with 70 additions and 47 deletions

View File

@ -28,6 +28,7 @@
"@types/node": "^20.3.3",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-react": "^4.0.1",
"autoprefixer": "^10.4.14",
"eslint": "^8.44.0",

View File

@ -50,6 +50,9 @@ devDependencies:
'@types/react-dom':
specifier: ^18.0.6
version: 18.0.11
'@typescript-eslint/parser':
specifier: ^5.61.0
version: 5.61.0(eslint@8.44.0)(typescript@5.1.6)
'@vitejs/plugin-react':
specifier: ^4.0.1
version: 4.0.1(vite@4.3.9)
@ -2161,7 +2164,7 @@ packages:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
dev: true
/@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.44.0)(typescript@5.1.6):
/@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6):
resolution: {integrity: sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2172,7 +2175,7 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.61.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/scope-manager': 5.54.0
'@typescript-eslint/type-utils': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/utils': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
@ -2202,8 +2205,8 @@ packages:
- typescript
dev: true
/@typescript-eslint/parser@5.54.0(eslint@8.44.0)(typescript@5.1.6):
resolution: {integrity: sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==}
/@typescript-eslint/parser@5.61.0(eslint@8.44.0)(typescript@5.1.6):
resolution: {integrity: sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -2212,9 +2215,9 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.54.0
'@typescript-eslint/types': 5.54.0
'@typescript-eslint/typescript-estree': 5.54.0(typescript@5.1.6)
'@typescript-eslint/scope-manager': 5.61.0
'@typescript-eslint/types': 5.61.0
'@typescript-eslint/typescript-estree': 5.61.0(typescript@5.1.6)
debug: 4.3.4
eslint: 8.44.0
typescript: 5.1.6
@ -2230,6 +2233,14 @@ packages:
'@typescript-eslint/visitor-keys': 5.54.0
dev: true
/@typescript-eslint/scope-manager@5.61.0:
resolution: {integrity: sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.61.0
'@typescript-eslint/visitor-keys': 5.61.0
dev: true
/@typescript-eslint/type-utils@5.54.0(eslint@8.44.0)(typescript@5.1.6):
resolution: {integrity: sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -2255,6 +2266,11 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/types@5.61.0:
resolution: {integrity: sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree@5.54.0(typescript@5.1.6):
resolution: {integrity: sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -2276,6 +2292,27 @@ packages:
- supports-color
dev: true
/@typescript-eslint/typescript-estree@5.61.0(typescript@5.1.6):
resolution: {integrity: sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.61.0
'@typescript-eslint/visitor-keys': 5.61.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
tsutils: 3.21.0(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/utils@5.54.0(eslint@8.44.0)(typescript@5.1.6):
resolution: {integrity: sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -2304,6 +2341,14 @@ packages:
eslint-visitor-keys: 3.3.0
dev: true
/@typescript-eslint/visitor-keys@5.61.0:
resolution: {integrity: sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.61.0
eslint-visitor-keys: 3.4.1
dev: true
/@vitejs/plugin-react@4.0.1(vite@4.3.9):
resolution: {integrity: sha512-g25lL98essfeSj43HJ0o4DMp0325XK0ITkxpgChzJU/CyemgyChtlxfnRbjfwxDGCTRxTiXtQAsdebQXKMRSOA==}
engines: {node: ^14.18.0 || >=16.0.0}
@ -2985,13 +3030,13 @@ packages:
'@babel/core': 7.21.0
'@babel/eslint-parser': 7.19.1(@babel/core@7.21.0)(eslint@8.44.0)
'@rushstack/eslint-patch': 1.2.0
'@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.61.0(eslint@8.44.0)(typescript@5.1.6)
babel-preset-react-app: 10.0.1
confusing-browser-globals: 1.0.11
eslint: 8.44.0
eslint-plugin-flowtype: 8.0.3(eslint@8.44.0)
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.44.0)
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)
eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.54.0)(eslint@8.44.0)(typescript@5.1.6)
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.44.0)
eslint-plugin-react: 7.32.2(eslint@8.44.0)
@ -3017,7 +3062,7 @@ packages:
- supports-color
dev: true
/eslint-module-utils@2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.44.0):
/eslint-module-utils@2.7.4(@typescript-eslint/parser@5.61.0)(eslint-import-resolver-node@0.3.7)(eslint@8.44.0):
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
engines: {node: '>=4'}
peerDependencies:
@ -3038,7 +3083,7 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.61.0(eslint@8.44.0)(typescript@5.1.6)
debug: 3.2.7
eslint: 8.44.0
eslint-import-resolver-node: 0.3.7
@ -3064,7 +3109,7 @@ packages:
string-natural-compare: 3.0.1
dev: true
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.44.0):
/eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.61.0)(eslint@8.44.0):
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'}
peerDependencies:
@ -3074,7 +3119,7 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.61.0(eslint@8.44.0)(typescript@5.1.6)
array-includes: 3.1.6
array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1
@ -3082,7 +3127,7 @@ packages:
doctrine: 2.1.0
eslint: 8.44.0
eslint-import-resolver-node: 0.3.7
eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.44.0)
eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.61.0)(eslint-import-resolver-node@0.3.7)(eslint@8.44.0)
has: 1.0.3
is-core-module: 2.11.0
is-glob: 4.0.3
@ -3110,7 +3155,7 @@ packages:
jest:
optional: true
dependencies:
'@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6)
'@typescript-eslint/experimental-utils': 5.54.0(eslint@8.44.0)(typescript@5.1.6)
eslint: 8.44.0
transitivePeerDependencies:

View File

@ -51,10 +51,10 @@ export const OpenSplatnet: React.FC<OpenSplatnetProps> = ({ children }) => {
</>
}
const btnLoading = loading || doing;
return <>
<button className={classNames('btn', {
<button className={classNames('btn w-full', {
'btn-disabled': !result?.profile.state.loginState?.sessionToken,
'loading': loading || doing,
})} onClick={onClick}>{children}</button>
})} onClick={onClick} disabled={btnLoading}>{btnLoading ? <span className='loading' /> : children}</button>
</>
}

View File

@ -61,11 +61,11 @@ export const RunPanel: React.FC<RunPanelProps> = () => {
<Checkbox disabled={disabled || loading} value={exportCoop} onChange={setExportCoop}>{t('导出打工数据')}</Checkbox>
<button
onClick={onClick}
className={classNames('btn w-full', {
className={classNames('btn btn-primary w-full', {
'btn-disabled': disabled || (!exportBattle && !exportCoop),
'loading': loading,
})}
>{t('导出')}</button>
disabled={loading}
>{loading ? <span className='loading' /> : t('导出')}</button>
</div>
</>
}

View File

@ -2,40 +2,17 @@
@tailwind components;
@tailwind utilities;
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color: #0f0f0f;
background-color: #f6f6f6;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
body {
width: 100vw;
height: 100vh;
}
#root {
width: 100vw;
height: 100vh;
overflow: hidden
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6f6f6;
background-color: #2f2f2f;
}
}
/* custom classes */
.flex-auto-all > * {

View File

@ -16,7 +16,7 @@ export const Home: React.FC = () => {
<Link to='/settings' className='btn'>{t('设置')}</Link>
<div className='flex gap-2 flex-auto-all'>
<OpenSplatnet>{t('打开鱿鱼圈3')}</OpenSplatnet>
<a className='btn' href={STAT_INK} target='_blank' rel='noreferrer'>{t('前往 stat.ink')}</a>
<a className='btn w-full' href={STAT_INK} target='_blank' rel='noreferrer'>{t('前往 stat.ink')}</a>
</div>
</div>
</div>