fix link in registration page and show back last message in conv… (#729)

fix link in registration page and show back last message in conversationlistitem
pull/737/head
Audric Ackermann 5 years ago committed by GitHub
commit 36e404f8f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2516,7 +2516,7 @@
}, },
"ByUsingThisService...": { "ByUsingThisService...": {
"message": "message":
"By using this service, you agree to our <a>Terms and Conditions</a> and <a href=\"https://getsession.org/privacy-policy/\" target=\"_blank\">Privacy Statement</a>" "By using this service, you agree to our <a href=\"https://getsession.org/privacy-policy/\">Terms and Conditions</a> and <a href=\"https://getsession.org/privacy-policy/\" target=\"_blank\">Privacy Statement</a>"
}, },
"beginYourSession": { "beginYourSession": {
"message": "Begin<br />your<br />Session." "message": "Begin<br />your<br />Session."

@ -146,7 +146,7 @@ export class ConversationListItem extends React.PureComponent<Props> {
{isMe ? i18n('noteToSelf') : this.renderUser()} {isMe ? i18n('noteToSelf') : this.renderUser()}
</div> </div>
{hasReceivedFriendRequest || this.renderUnread()} {hasReceivedFriendRequest || this.renderUnread()}
{!isFriend && ( {isFriend && (
<div <div
className={classNames( className={classNames(
'module-conversation-list-item__header__date', 'module-conversation-list-item__header__date',
@ -227,14 +227,9 @@ export class ConversationListItem extends React.PureComponent<Props> {
isTyping, isTyping,
unreadCount, unreadCount,
i18n, i18n,
isFriend,
isPendingFriendRequest, isPendingFriendRequest,
} = this.props; } = this.props;
if (isFriend) {
return null;
}
if (!lastMessage && !isTyping) { if (!lastMessage && !isTyping) {
return null; return null;
} }

@ -437,7 +437,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
} }
private renderNamePasswordAndVerifyPasswordFields() { private renderNamePasswordAndVerifyPasswordFields() {
const passwordDoesNotMatchString = const passwordsDoNotMatch =
!this.state.passwordFieldsMatch && this.state.password !this.state.passwordFieldsMatch && this.state.password
? window.i18n('passwordsDoNotMatch') ? window.i18n('passwordsDoNotMatch')
: undefined; : undefined;
@ -472,7 +472,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
<SessionInput <SessionInput
label={window.i18n('verifyPassword')} label={window.i18n('verifyPassword')}
error={passwordDoesNotMatchString} error={passwordsDoNotMatch}
type="password" type="password"
placeholder={window.i18n('optionalPassword')} placeholder={window.i18n('optionalPassword')}
onValueChanged={(val: string) => { onValueChanged={(val: string) => {
@ -735,7 +735,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
passwordFieldsMatch, passwordFieldsMatch,
} = this.state; } = this.state;
// Make sure the password is valid // Make sure the password is valid
if (passwordErrorString || passwordFieldsMatch) { if (passwordErrorString) {
window.pushToast({ window.pushToast({
title: window.i18n('invalidPassword'), title: window.i18n('invalidPassword'),
type: 'error', type: 'error',
@ -744,6 +744,17 @@ export class RegistrationTabs extends React.Component<{}, State> {
return; return;
} }
if (!!password && !passwordFieldsMatch) {
window.pushToast({
title: window.i18n('passwordsDoNotMatch'),
type: 'error',
id: 'invalidPassword',
});
return;
}
if (!mnemonicSeed) { if (!mnemonicSeed) {
return; return;
} }

@ -57,7 +57,7 @@ export class SessionClosableOverlay extends React.Component<Props> {
break; break;
case 'contact': case 'contact':
title = window.i18n('addContact'); title = window.i18n('addContact');
buttonText = window.i18n('addContact'); buttonText = window.i18n('next');
descriptionLong = window.i18n('usersCanShareTheir...'); descriptionLong = window.i18n('usersCanShareTheir...');
subtitle = window.i18n('enterSessionID'); subtitle = window.i18n('enterSessionID');
placeholder = window.i18n('pasteSessionIDRecipient'); placeholder = window.i18n('pasteSessionIDRecipient');

Loading…
Cancel
Save