diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ab74a8471..0d80fa409 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1172,7 +1172,7 @@ "Confirmation dialog title that asks the user if they really wish to delete a public channel. Answer buttons use the strings 'ok' and 'cancel'. The deletion is permanent, i.e. it cannot be undone." }, "deletePublicChannelConfirmation": { - "message": "Leave this public channel?", + "message": "Leave this Open Group?", "description": "Confirmation dialog text that tells the user what will happen if they leave the public channel." }, diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index c5b510941..d147e3704 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -478,7 +478,7 @@ $session-element-border-green: 4px solid $session-color-green; &-text { @include session-color-subtle($session-color-white); - font-family: "SF Pro Text"; + font-family: 'SF Pro Text'; font-weight: 300; } diff --git a/stylesheets/_session_group_panel.scss b/stylesheets/_session_group_panel.scss index bbf2460cc..9cf26d536 100644 --- a/stylesheets/_session_group_panel.scss +++ b/stylesheets/_session_group_panel.scss @@ -79,14 +79,13 @@ } .module-attachment-section__items { - &-media { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; } - &-documents { + &-documents { width: 100%; } } diff --git a/ts/components/conversation/media-gallery/AttachmentSection.tsx b/ts/components/conversation/media-gallery/AttachmentSection.tsx index b0a360e17..e8ec59a4f 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.tsx @@ -15,9 +15,9 @@ interface Props { } export class AttachmentSection extends React.Component { - public render() { + public render() { const { type } = this.props; - + return (
diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index ba864a9ce..8808b3f16 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -33,17 +33,12 @@ export class SessionPasswordModal extends React.Component { this.closeDialog = this.closeDialog.bind(this); this.onKeyUp = this.onKeyUp.bind(this); - window.addEventListener('keyup', this.onKeyUp); } public componentDidMount() { setTimeout(() => $('#password-modal-input').focus(), 100); } - public componentWillUnmount() { - window.removeEventListener('keyup', this.onKeyUp); - } - public render() { const { action, onOk } = this.props; const placeholders = @@ -69,6 +64,7 @@ export class SessionPasswordModal extends React.Component { type="password" id="password-modal-input" placeholder={placeholders[0]} + onKeyUp={this.onKeyUp} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} /> {action !== PasswordAction.Remove && ( @@ -76,6 +72,7 @@ export class SessionPasswordModal extends React.Component { type="password" id="password-modal-input-confirm" placeholder={placeholders[1]} + onKeyUp={this.onKeyUp} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} /> )} @@ -196,11 +193,8 @@ export class SessionPasswordModal extends React.Component { private async onKeyUp(event: any) { const { onOk } = this.props; - const setPasswordFocussed = - $('#password-modal-input').is(':focus') || - $('#password-modal-input-confirm').is(':focus'); - if (event.key === 'Enter' && setPasswordFocussed) { + if (event.key === 'Enter') { await this.setPassword(onOk); } diff --git a/ts/components/session/SessionPasswordPrompt.tsx b/ts/components/session/SessionPasswordPrompt.tsx index 77e329b47..cd30d3e53 100644 --- a/ts/components/session/SessionPasswordPrompt.tsx +++ b/ts/components/session/SessionPasswordPrompt.tsx @@ -27,18 +27,12 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> { this.onKeyUp = this.onKeyUp.bind(this); this.initLogin = this.initLogin.bind(this); this.initClearDataView = this.initClearDataView.bind(this); - - window.addEventListener('keyup', this.onKeyUp); } public componentDidMount() { setTimeout(() => $('#password-prompt-input').focus(), 100); } - public componentWillUnmount() { - window.removeEventListener('keyup', this.onKeyUp); - } - public render() { const showResetElements = this.state.errorCount >= window.CONSTANTS.MAX_LOGIN_TRIES; @@ -66,6 +60,7 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> { type="password" defaultValue="" placeholder={' '} + onKeyUp={this.onKeyUp} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} /> ); diff --git a/ts/components/session/SessionSeedModal.tsx b/ts/components/session/SessionSeedModal.tsx index 27a621265..e9d461bd9 100644 --- a/ts/components/session/SessionSeedModal.tsx +++ b/ts/components/session/SessionSeedModal.tsx @@ -36,8 +36,6 @@ export class SessionSeedModal extends React.Component { this.confirmPassword = this.confirmPassword.bind(this); this.checkHasPassword = this.checkHasPassword.bind(this); this.onEnter = this.onEnter.bind(this); - - window.addEventListener('keyup', this.onEnter); } public componentDidMount() { @@ -88,6 +86,7 @@ export class SessionSeedModal extends React.Component { type="password" id="seed-input-password" placeholder={i18n('password')} + onKeyUp={this.onEnter} maxLength={maxPasswordLen} /> @@ -222,9 +221,7 @@ export class SessionSeedModal extends React.Component { private onEnter(event: any) { if (event.key === 'Enter') { - if ($('#seed-input-password').is(':focus')) { - this.confirmPassword(); - } + this.confirmPassword(); } } }