chore: update all dependencies (#699)

This commit is contained in:
Mo
2021-10-22 14:47:41 -05:00
committed by GitHub
parent fcc22ffb78
commit 413fe47828
38 changed files with 2767 additions and 4029 deletions

View File

@@ -45,7 +45,7 @@ const Authentication = observer(({ application, appState }: Props) => {
useEffect(() => {
if (isEmailFocused) {
emailInputRef.current.focus();
emailInputRef.current!.focus();
setIsEmailFocused(false);
}
}, [isEmailFocused]);
@@ -64,9 +64,9 @@ const Authentication = observer(({ application, appState }: Props) => {
application.setCustomHost(value);
};
const emailInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>();
const passwordConfirmationInputRef = useRef<HTMLInputElement>();
const emailInputRef = useRef<HTMLInputElement>(null);
const passwordInputRef = useRef<HTMLInputElement>(null);
const passwordConfirmationInputRef = useRef<HTMLInputElement>(null);
const handleSignInClick = () => {
setShowSignIn(true);
@@ -79,8 +79,8 @@ const Authentication = observer(({ application, appState }: Props) => {
};
const blurAuthFields = () => {
emailInputRef.current.blur();
passwordInputRef.current.blur();
emailInputRef.current!.blur();
passwordInputRef.current!.blur();
passwordConfirmationInputRef.current?.blur();
};
@@ -277,7 +277,7 @@ const Authentication = observer(({ application, appState }: Props) => {
onKeyDown={handleKeyPressKeyDown}
value={passwordConfirmation}
onChange={handlePasswordConfirmationChange}
ref={passwordConfirmationInputRef}
ref={passwordConfirmationInputRef!}
/>
)}
<div className="sk-panel-row" />

View File

@@ -29,7 +29,7 @@ export const ConfirmPassword: FunctionComponent<Props> = observer(
const [isEphemeral, setIsEphemeral] = useState(false);
const [shouldMergeLocal, setShouldMergeLocal] = useState(true);
const passwordInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
passwordInputRef?.current?.focus();
@@ -59,7 +59,7 @@ export const ConfirmPassword: FunctionComponent<Props> = observer(
e.preventDefault();
if (!password) {
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
return;
}
@@ -89,7 +89,7 @@ export const ConfirmPassword: FunctionComponent<Props> = observer(
.alert(STRING_NON_MATCHING_PASSWORDS)
.finally(() => {
setConfirmPassword('');
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
});
}
};

View File

@@ -31,12 +31,12 @@ export const CreateAccount: FunctionComponent<Props> = observer(
}) => {
const [showPassword, setShowPassword] = useState(false);
const emailInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>();
const emailInputRef = useRef<HTMLInputElement>(null);
const passwordInputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (emailInputRef.current) {
emailInputRef.current.focus();
emailInputRef.current!.focus();
}
}, []);
@@ -62,12 +62,12 @@ export const CreateAccount: FunctionComponent<Props> = observer(
e.preventDefault();
if (!email || email.length === 0) {
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!password || password.length === 0) {
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
return;
}

View File

@@ -24,7 +24,7 @@ const DataBackup = observer(({
appState
}: Props) => {
const fileInputRef = useRef<HTMLInputElement | null>(null);
const fileInputRef = useRef<HTMLInputElement>(null);
const [isImportDataLoading, setIsImportDataLoading] = useState(false);
const { isBackupEncrypted, isEncryptionEnabled, setIsBackupEncrypted } = appState.accountMenu;

View File

@@ -30,7 +30,7 @@ const PasscodeLock = observer(({
const { setIsEncryptionEnabled, setIsBackupEncrypted, setEncryptionStatusString } = appState.accountMenu;
const passcodeInputRef = useRef<HTMLInputElement>();
const passcodeInputRef = useRef<HTMLInputElement>(null);
const [passcode, setPasscode] = useState<string | undefined>(undefined);
const [passcodeConfirmation, setPasscodeConfirmation] = useState<string | undefined>(undefined);
@@ -155,7 +155,7 @@ const PasscodeLock = observer(({
useEffect(() => {
if (isPasscodeFocused) {
passcodeInputRef.current.focus();
passcodeInputRef.current!.focus();
setIsPasscodeFocused(false);
}
}, [isPasscodeFocused]);

View File

@@ -29,12 +29,12 @@ export const SignInPane: FunctionComponent<Props> = observer(
const [showPassword, setShowPassword] = useState(false);
const [shouldMergeLocal, setShouldMergeLocal] = useState(true);
const emailInputRef = useRef<HTMLInputElement>();
const passwordInputRef = useRef<HTMLInputElement>();
const emailInputRef = useRef<HTMLInputElement>(null);
const passwordInputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (emailInputRef?.current) {
emailInputRef.current.focus();
emailInputRef.current!.focus();
}
}, []);
@@ -73,8 +73,8 @@ export const SignInPane: FunctionComponent<Props> = observer(
const signIn = () => {
setIsSigningIn(true);
emailInputRef?.current.blur();
passwordInputRef?.current.blur();
emailInputRef?.current!.blur();
passwordInputRef?.current!.blur();
application
.signIn(email, password, isStrictSignin, isEphemeral, shouldMergeLocal)
@@ -92,7 +92,7 @@ export const SignInPane: FunctionComponent<Props> = observer(
application.alertService.alert(err);
}
setPassword('');
passwordInputRef?.current.blur();
passwordInputRef?.current!.blur();
})
.finally(() => {
setIsSigningIn(false);
@@ -109,12 +109,12 @@ export const SignInPane: FunctionComponent<Props> = observer(
e.preventDefault();
if (!email || email.length === 0) {
emailInputRef?.current.focus();
emailInputRef?.current!.focus();
return;
}
if (!password || password.length === 0) {
passwordInputRef?.current.focus();
passwordInputRef?.current!.focus();
return;
}