refactor: upgrade deps
parent
f69aaef6d7
commit
32079a50e7
|
|
@ -11,35 +11,36 @@
|
|||
"lint": "eslint --max-warnings=0 src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^1.4.0",
|
||||
"classnames": "^2.3.2",
|
||||
"daisyui": "^3.1.7",
|
||||
"i18next": "^23.2.6",
|
||||
"i18next-browser-languagedetector": "^7.1.0",
|
||||
"@tauri-apps/api": "^1.5.3",
|
||||
"classnames": "^2.5.1",
|
||||
"daisyui": "^4.6.1",
|
||||
"i18next": "^23.8.1",
|
||||
"i18next-browser-languagedetector": "^7.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-i18next": "^13.0.1",
|
||||
"react-icons": "^4.10.1",
|
||||
"react-router-dom": "^6.14.1",
|
||||
"react-use": "^17.4.0"
|
||||
"react-i18next": "^14.0.1",
|
||||
"react-icons": "^5.0.1",
|
||||
"react-router-dom": "^6.21.3",
|
||||
"react-use": "^17.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.4.0",
|
||||
"@types/node": "^20.3.3",
|
||||
"@tauri-apps/cli": "^1.5.9",
|
||||
"@types/node": "^20.11.10",
|
||||
"@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",
|
||||
"@typescript-eslint/parser": "^6.20.0",
|
||||
"@typescript-eslint/typescript-estree": "^6.20.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"i18next-http-backend": "^2.2.1",
|
||||
"postcss": "^8.4.24",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^4.3.9",
|
||||
"i18next-http-backend": "^2.4.2",
|
||||
"postcss": "^8.4.33",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.12",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-tsconfig-paths": "^4.2.0"
|
||||
"vite-tsconfig-paths": "^4.3.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
|
|
|
|||
4685
gui/pnpm-lock.yaml
4685
gui/pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -11,6 +11,6 @@ export const CheckUpdate: React.FC<{ className?: string, children?: ReactNode }>
|
|||
}
|
||||
|
||||
return <>
|
||||
<button className={className} onClick={onClick}>{children}</button>
|
||||
<button type='button' className={className} onClick={onClick}>{children}</button>
|
||||
</>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export const ErrorContent: React.FC<ErrorContentProps> = ({ error, retry }) => {
|
|||
<span className='inline-flex items-center'>
|
||||
<AiOutlineWarning className='inline-block scale-[2] mr-4 justify-end flex-none' />
|
||||
<div className='max-w-full break-all'>
|
||||
<div>{t('发生了错误')}{retry && <button className='link link-info ml-1'>{t('重试')}</button>}</div>
|
||||
<div>{t('发生了错误')}{retry && <button type='button' className='link link-info ml-1'>{t('重试')}</button>}</div>
|
||||
{String(error)}
|
||||
</div>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ type HeaderProps = {
|
|||
export const Header: React.FC<HeaderProps> = ({ title }) => {
|
||||
const navigate = useNavigate();
|
||||
return <>
|
||||
<h2 className="card-title" data-tauri-drag-region><button onClick={() => navigate(-1)}><AiOutlineLeft /></button>{title}</h2>
|
||||
<h2 className="card-title" data-tauri-drag-region><button type='button' onClick={() => navigate(-1)}><AiOutlineLeft /></button>{title}</h2>
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,13 @@ export const OpenSplatnet: React.FC<OpenSplatnetProps> = ({ children }) => {
|
|||
|
||||
const btnLoading = loading || doing;
|
||||
return <>
|
||||
<button className={classNames('btn w-full', {
|
||||
<button
|
||||
type='button'
|
||||
className={classNames('btn w-full', {
|
||||
'btn-disabled': !result?.profile.state.loginState?.sessionToken,
|
||||
})} onClick={onClick} disabled={btnLoading}>{btnLoading ? <span className='loading' /> : children}</button>
|
||||
})}
|
||||
onClick={onClick}
|
||||
disabled={btnLoading}
|
||||
>{btnLoading ? <span className='loading' /> : children}</button>
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export const RunPanel: React.FC<RunPanelProps> = () => {
|
|||
<Checkbox disabled={disabled || loading} value={exportBattle} onChange={setExportBattle}>{t('导出对战数据')}</Checkbox>
|
||||
<Checkbox disabled={disabled || loading} value={exportCoop} onChange={setExportCoop}>{t('导出打工数据')}</Checkbox>
|
||||
<button
|
||||
type='button'
|
||||
onClick={onClick}
|
||||
className={classNames('btn btn-primary w-full', {
|
||||
'btn-disabled': disabled || (!exportBattle && !exportCoop),
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ const Steps: React.FC<{ steps: Step[], className?: string }> = ({ className, ste
|
|||
{Content && <Content onChange={setState} />}
|
||||
<div className='mt-4 flex gap-2'>
|
||||
<button
|
||||
type='button'
|
||||
onClick={() => setStep(s => s - 1)}
|
||||
className={classNames('btn', {
|
||||
'btn-disabled': !hasPrev || !state.prev,
|
||||
})}
|
||||
>{t('上一步')}</button>
|
||||
<button
|
||||
type='button'
|
||||
onClick={() => setStep(s => s + 1)}
|
||||
className={classNames('btn', {
|
||||
'btn-disabled': !hasNext || !state.next,
|
||||
|
|
@ -49,7 +51,11 @@ const LoginNintendoAccount: React.FC<{ onChange: (v: StepState) => void }> = ({
|
|||
const { t } = useTranslation();
|
||||
|
||||
return <div className='my-3'>
|
||||
<button className='btn' onClick={() => onChange({ next: true, prev: true })}>{t('点击登录')}</button>
|
||||
<button
|
||||
type='button'
|
||||
className='btn'
|
||||
onClick={() => onChange({ next: true, prev: true })}
|
||||
>{t('点击登录')}</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ const Form: React.FC<{
|
|||
<label className="label">
|
||||
<span className="label-text">{t('Nintendo Account 会话令牌')}</span>
|
||||
<span className="label-text-alt"><button
|
||||
type='button'
|
||||
className={classNames('link', {
|
||||
loading: loginState.loading,
|
||||
})}
|
||||
|
|
@ -149,13 +150,22 @@ const Form: React.FC<{
|
|||
<ErrorContent error={error} />
|
||||
<div className='flex gap-4 max-w-md justify-between flex-auto-all'>
|
||||
<div className="tooltip" data-tip={changed ? undefined : t('没有更改')}>
|
||||
<button className={classNames('btn btn-primary w-full', {
|
||||
<button
|
||||
type='button'
|
||||
className={classNames('btn btn-primary w-full', {
|
||||
loading,
|
||||
})} onClick={onSave} disabled={!changed || statInkKeyError}>{t('保存')}</button>
|
||||
})}
|
||||
onClick={onSave}
|
||||
disabled={!changed || statInkKeyError}
|
||||
>{t('保存')}</button>
|
||||
</div>
|
||||
<button className={classNames('btn', {
|
||||
<button
|
||||
type='button'
|
||||
className={classNames('btn', {
|
||||
loading,
|
||||
})} onClick={() => setValue(oldValue)}>{t('重置')}</button>
|
||||
})}
|
||||
onClick={() => setValue(oldValue)}
|
||||
>{t('重置')}</button>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,14 +91,15 @@ export const LogProvider: React.FC<{ limit?: number, children?: React.ReactNode
|
|||
LOG_SUB.delete(cb);
|
||||
}
|
||||
}, [limit])
|
||||
|
||||
|
||||
const renderedLogs = useMemo(() => logs.map(renderLog), [logs])
|
||||
|
||||
return <LOG_CONTEXT.Provider value={{
|
||||
const value = useMemo(() => {
|
||||
const renderedLogs = logs.map(renderLog)
|
||||
return {
|
||||
logs,
|
||||
renderedLogs,
|
||||
}}>
|
||||
}
|
||||
}, [logs])
|
||||
|
||||
return <LOG_CONTEXT.Provider value={value}>
|
||||
{children}
|
||||
</LOG_CONTEXT.Provider>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue