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
This commit is contained in:
Audric Ackermann 2020-01-21 13:06:39 +11:00 committed by GitHub
commit 36e404f8f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 11 deletions

View file

@ -2516,7 +2516,7 @@
},
"ByUsingThisService...": {
"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": {
"message": "Begin<br />your<br />Session."

View file

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

View file

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

View file

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