chore: bump next-safe-action to 4.0.1
This commit is contained in:
parent
57dc28f518
commit
43415f9e14
8 changed files with 33 additions and 28 deletions
|
@ -55,7 +55,7 @@
|
|||
"next": "13.5.4",
|
||||
"next-client-cookies": "^1.0.5",
|
||||
"next-intl": "^2.20.2",
|
||||
"next-safe-action": "^3.4.0",
|
||||
"next-safe-action": "^4.0.1",
|
||||
"pg": "^8.11.3",
|
||||
"qrcode.react": "^3.1.0",
|
||||
"react": "18.2.0",
|
||||
|
@ -148,8 +148,6 @@
|
|||
},
|
||||
"homepage": "https://github.com/runtipi/runtipi#readme",
|
||||
"pnpm": {
|
||||
"patchedDependencies": {
|
||||
"next-safe-action@3.4.0": "patches/next-safe-action@3.4.0.patch"
|
||||
}
|
||||
"patchedDependencies": {}
|
||||
}
|
||||
}
|
||||
|
|
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
|
@ -4,11 +4,6 @@ settings:
|
|||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
patchedDependencies:
|
||||
next-safe-action@3.4.0:
|
||||
hash: qgf42rjgttuw3cdkp2gsi7r344
|
||||
path: patches/next-safe-action@3.4.0.patch
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
|
@ -83,8 +78,8 @@ importers:
|
|||
specifier: ^2.20.2
|
||||
version: 2.20.2(next@13.5.4)(react@18.2.0)
|
||||
next-safe-action:
|
||||
specifier: ^3.4.0
|
||||
version: 3.4.0(patch_hash=qgf42rjgttuw3cdkp2gsi7r344)(next@13.5.4)(react@18.2.0)(zod@3.22.4)
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1(next@13.5.4)(react@18.2.0)(zod@3.22.4)
|
||||
pg:
|
||||
specifier: ^8.11.3
|
||||
version: 8.11.3
|
||||
|
@ -8448,8 +8443,8 @@ packages:
|
|||
react: 18.2.0
|
||||
dev: true
|
||||
|
||||
/next-safe-action@3.4.0(patch_hash=qgf42rjgttuw3cdkp2gsi7r344)(next@13.5.4)(react@18.2.0)(zod@3.22.4):
|
||||
resolution: {integrity: sha512-EUmcChSlfIjdHu2n6L4w3EQnb1Np9C2OEWObPSKggdK/IhihDDatsunZKGcuimxFO3JbBdpFiUYcMe2slbovUg==}
|
||||
/next-safe-action@4.0.1(next@13.5.4)(react@18.2.0)(zod@3.22.4):
|
||||
resolution: {integrity: sha512-qaZtNJxnkvE9AVQN8sW/OEuYk38gOFMwH4QEYBww/MWM0fVkRMPoHUQK43oSRVdqCDj49wqJrrcyDH9hgv+JrA==}
|
||||
engines: {node: '>=16'}
|
||||
peerDependencies:
|
||||
next: '>= 13.4.2'
|
||||
|
@ -8460,7 +8455,6 @@ packages:
|
|||
react: 18.2.0
|
||||
zod: 3.22.4
|
||||
dev: false
|
||||
patched: true
|
||||
|
||||
/next@13.5.4(@babel/core@7.23.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.69.2):
|
||||
resolution: {integrity: sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==}
|
||||
|
|
|
@ -36,8 +36,8 @@ export function LoginContainer() {
|
|||
});
|
||||
|
||||
if (totpSessionId) {
|
||||
return <TotpForm loading={verifyTotpMutation.isExecuting} onSubmit={(totpCode) => verifyTotpMutation.execute({ totpCode, totpSessionId })} />;
|
||||
return <TotpForm loading={verifyTotpMutation.status === 'executing'} onSubmit={(totpCode) => verifyTotpMutation.execute({ totpCode, totpSessionId })} />;
|
||||
}
|
||||
|
||||
return <LoginForm loading={loginMutation.isExecuting} onSubmit={({ email, password }) => loginMutation.execute({ username: email, password })} />;
|
||||
return <LoginForm loading={loginMutation.status === 'executing'} onSubmit={({ email, password }) => loginMutation.execute({ username: email, password })} />;
|
||||
}
|
||||
|
|
|
@ -20,5 +20,5 @@ export const RegisterContainer: React.FC = () => {
|
|||
},
|
||||
});
|
||||
|
||||
return <RegisterForm onSubmit={({ email, password }) => registerMutation.execute({ username: email, password })} loading={registerMutation.isExecuting} />;
|
||||
return <RegisterForm onSubmit={({ email, password }) => registerMutation.execute({ username: email, password })} loading={registerMutation.status === 'executing'} />;
|
||||
};
|
||||
|
|
|
@ -30,11 +30,11 @@ export const ResetPasswordContainer: React.FC = () => {
|
|||
},
|
||||
});
|
||||
|
||||
if (resetPasswordMutation.res.data?.success && resetPasswordMutation.res.data?.email) {
|
||||
if (resetPasswordMutation.result.data?.success && resetPasswordMutation.result.data?.email) {
|
||||
return (
|
||||
<>
|
||||
<h2 className="h2 text-center mb-3">{t('auth.reset-password.success-title')}</h2>
|
||||
<p>{t('auth.reset-password.success', { email: resetPasswordMutation.res.data.email })}</p>
|
||||
<p>{t('auth.reset-password.success', { email: resetPasswordMutation.result.data.email })}</p>
|
||||
<Button onClick={() => router.push('/login')} type="button" className="btn btn-primary w-100">
|
||||
{t('auth.reset-password.back-to-login')}
|
||||
</Button>
|
||||
|
@ -44,7 +44,7 @@ export const ResetPasswordContainer: React.FC = () => {
|
|||
|
||||
return (
|
||||
<ResetPasswordForm
|
||||
loading={resetPasswordMutation.isExecuting}
|
||||
loading={resetPasswordMutation.status === 'executing' || cancelRequestMutation.status === 'executing'}
|
||||
onCancel={() => cancelRequestMutation.execute()}
|
||||
onSubmit={({ password }) => resetPasswordMutation.execute({ newPassword: password })}
|
||||
/>
|
||||
|
|
|
@ -58,17 +58,30 @@ export const ChangePasswordForm = () => {
|
|||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(onSubmit)} className="mb-4 w-100 ">
|
||||
<Input disabled={changePasswordMutation.isExecuting} {...register('currentPassword')} error={errors.currentPassword?.message} type="password" placeholder={t('form.current-password')} />
|
||||
<Input disabled={changePasswordMutation.isExecuting} {...register('newPassword')} error={errors.newPassword?.message} className="mt-2" type="password" placeholder={t('form.new-password')} />
|
||||
<Input
|
||||
disabled={changePasswordMutation.isExecuting}
|
||||
disabled={changePasswordMutation.status === 'executing'}
|
||||
{...register('currentPassword')}
|
||||
error={errors.currentPassword?.message}
|
||||
type="password"
|
||||
placeholder={t('form.current-password')}
|
||||
/>
|
||||
<Input
|
||||
disabled={changePasswordMutation.status === 'executing'}
|
||||
{...register('newPassword')}
|
||||
error={errors.newPassword?.message}
|
||||
className="mt-2"
|
||||
type="password"
|
||||
placeholder={t('form.new-password')}
|
||||
/>
|
||||
<Input
|
||||
disabled={changePasswordMutation.status === 'executing'}
|
||||
{...register('newPasswordConfirm')}
|
||||
error={errors.newPasswordConfirm?.message}
|
||||
className="mt-2"
|
||||
type="password"
|
||||
placeholder={t('form.confirm-password')}
|
||||
/>
|
||||
<Button disabled={changePasswordMutation.isExecuting} className="mt-3" type="submit">
|
||||
<Button disabled={changePasswordMutation.status === 'executing'} className="mt-3" type="submit">
|
||||
{t('form.change-password')}
|
||||
</Button>
|
||||
</form>
|
||||
|
|
|
@ -103,7 +103,7 @@ export const OtpForm = (props: { totpEnabled: boolean }) => {
|
|||
return (
|
||||
<>
|
||||
{!key && <Switch onCheckedChange={handleTotp} checked={totpEnabled} label={t('enable-2fa')} />}
|
||||
{getTotpUriMutation.isExecuting && (
|
||||
{getTotpUriMutation.status === 'executing' && (
|
||||
<div className="progress w-50">
|
||||
<div className="progress-bar progress-bar-indeterminate bg-green" />
|
||||
</div>
|
||||
|
@ -123,7 +123,7 @@ export const OtpForm = (props: { totpEnabled: boolean }) => {
|
|||
>
|
||||
<p className="text-muted">{t('password-needed-hint')}</p>
|
||||
<Input name="password" type="password" onChange={(e) => setPassword(e.target.value)} placeholder={t('form.password')} />
|
||||
<Button loading={getTotpUriMutation.isExecuting} type="submit" className="btn-success mt-3">
|
||||
<Button loading={getTotpUriMutation.status === 'executing'} type="submit" className="btn-success mt-3">
|
||||
{t('enable-2fa')}
|
||||
</Button>
|
||||
</form>
|
||||
|
@ -144,7 +144,7 @@ export const OtpForm = (props: { totpEnabled: boolean }) => {
|
|||
>
|
||||
<p className="text-muted">{t('password-needed-hint')}</p>
|
||||
<Input name="password" type="password" onChange={(e) => setPassword(e.target.value)} placeholder={t('form.password')} />
|
||||
<Button loading={disableTotpMutation.isExecuting} type="submit" className="btn-danger mt-3">
|
||||
<Button loading={disableTotpMutation.status === 'executing'} type="submit" className="btn-danger mt-3">
|
||||
{t('disable-2fa')}
|
||||
</Button>
|
||||
</form>
|
||||
|
|
|
@ -32,7 +32,7 @@ export const SettingsContainer = ({ initialValues, currentLocale }: Props) => {
|
|||
|
||||
return (
|
||||
<div className="card-body">
|
||||
<SettingsForm initalValues={initialValues} currentLocale={currentLocale} loading={updateSettingsMutation.isExecuting} onSubmit={onSubmit} />
|
||||
<SettingsForm initalValues={initialValues} currentLocale={currentLocale} loading={updateSettingsMutation.status === 'executing'} onSubmit={onSubmit} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue