fix: pass yarn ready

pull/2765/head
William Grant 2 years ago
parent 977dbea9dc
commit b00eb52d35

@ -15,8 +15,12 @@ import { SessionButton, SessionButtonType } from '../basic/SessionButton';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionIconButton } from '../icon';
import { sanitizeSessionUsername } from '../../session/utils/String';
import { useOurConversationUsername } from '../../hooks/useParamSelector';
import { useOurAvatarPath } from '../../hooks/useParamSelector';
import { setLastProfileUpdateTimestamp } from '../../util/storage';
import { ConversationTypeEnum } from '../../models/conversationAttributes';
import { MAX_USERNAME_BYTES } from '../../session/constants';
import styled from 'styled-components';
import { saveQRCode } from '../../util/saveQRCode';
import { useOurAvatarPath, useOurConversationUsername } from '../../hooks/useParamSelector';
import { useDispatch } from 'react-redux';
import styled from 'styled-components';
import { ConversationTypeEnum } from '../../models/conversationAttributes';
@ -116,6 +120,7 @@ const ProfileHeader = (props: ProfileHeaderProps): ReactElement => {
type ProfileDialogModes = 'default' | 'edit' | 'qr';
// tslint:disable-next-line: max-func-body-length
export const EditProfileDialog = (): ReactElement => {
const dispatch = useDispatch();
@ -177,7 +182,7 @@ export const EditProfileDialog = (): ReactElement => {
switch (event.key) {
case 'Enter':
if (mode === 'edit') {
onClickOK();
void onClickOK();
}
break;
case 'Esc':
@ -211,6 +216,8 @@ export const EditProfileDialog = (): ReactElement => {
};
return (
/* The <div> element has a child <input> element that allows keyboard interaction */
/* tslint:disable-next-line: react-a11y-event-has-role */
<div className="edit-profile-dialog" data-testid="edit-profile-dialog" onKeyUp={handleOnKeyUp}>
<SessionWrapperModal
title={window.i18n('editProfileModalTitle')}

@ -5,17 +5,16 @@ import { SpacerLG } from '../basic/Text';
import { useDispatch } from 'react-redux';
import { editProfileModal, updateEditProfilePictureModel } from '../../state/ducks/modalDialog';
import { ProfileAvatar } from './EditProfileDialog';
import styled from 'styled-components';
import { clearOurAvatar, uploadOurAvatar } from '../../interactions/conversationInteractions';
import { ToastUtils } from '../../session/utils';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionIconButton } from '../icon';
import { pickFileForAvatar } from '../../types/attachments/VisualAttachment';
import styled from 'styled-components';
const StyledAvatarContainer = styled.div`
cursor: pointer;
`;
const UploadImageButton = () => {
return (
<div style={{ position: 'relative' }}>
@ -93,7 +92,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) =>
const handleUpload = async () => {
setLoading(true);
if (newAvatarObjectUrl === avatarPath) {
window.log.debug(`Avatar Object URL has not changed!`);
window.log.debug('Avatar Object URL has not changed!');
return;
}
@ -117,7 +116,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) =>
showHeader={true}
showExitIcon={true}
>
<div className="avatar-center" onClick={handleAvatarClick}>
<div className="avatar-center" role="button" onClick={handleAvatarClick}>
<StyledAvatarContainer className="avatar-center-inner">
{newAvatarObjectUrl || avatarPath ? (
<ProfileAvatar

@ -7,8 +7,8 @@ import {
getChangeNickNameDialog,
getConfirmModal,
getDeleteAccountModalState,
getEditProfilePictureModalState,
getEditProfileDialog,
getEditProfilePictureModalState,
getInviteContactModal,
getOnionPathDialog,
getReactClearAllDialog,

@ -8,8 +8,8 @@ import {
ChangeNickNameModalState,
ConfirmModalState,
DeleteAccountModalState,
EditProfilePictureModalState,
EditProfileModalState,
EditProfilePictureModalState,
InviteContactModalState,
ModalState,
OnionPathModalState,

Loading…
Cancel
Save