Merge pull request #881 from Bilb/fix-button-label-registration

display continue session signin with seed
pull/907/head
Audric Ackermann 5 years ago committed by GitHub
commit 0c4fe9a361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2597,6 +2597,9 @@
"message": "Enter other devices Session ID here"
},
"continueYourSession": {
"message": "Continue Your Session"
},
"linkDevice": {
"message": "Link Device"
},
"restoreSessionID": {

@ -74,7 +74,10 @@
newMembers.length + existingMembers.length >
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
) {
const msg = window.i18n('maxGroupMembersError', window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT);
const msg = window.i18n(
'maxGroupMembersError',
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
);
window.pushToast({
title: msg,

@ -399,13 +399,18 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
groupMembers: Array<ContactType>
) {
// Validate groupName and groupMembers length
if (groupName.length === 0 ||
groupName.length > window.CONSTANTS.MAX_GROUP_NAME_LENGTH) {
window.pushToast({
title: window.i18n('invalidGroupName', window.CONSTANTS.MAX_GROUP_NAME_LENGTH),
type: 'error',
id: 'invalidGroupName',
});
if (
groupName.length === 0 ||
groupName.length > window.CONSTANTS.MAX_GROUP_NAME_LENGTH
) {
window.pushToast({
title: window.i18n(
'invalidGroupName',
window.CONSTANTS.MAX_GROUP_NAME_LENGTH
),
type: 'error',
id: 'invalidGroupName',
});
return;
}
@ -416,7 +421,10 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
groupMembers.length >= window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
) {
window.pushToast({
title: window.i18n('invalidGroupSize', window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT),
title: window.i18n(
'invalidGroupSize',
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
),
type: 'error',
id: 'invalidGroupSize',
});

@ -585,6 +585,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
} = this.state;
let enableContinue = true;
let text = window.i18n('continueYourSession');
const displayNameOK = !displayNameError && !!displayName; //display name required
const mnemonicOK = !mnemonicError && !!mnemonicSeed; //Mnemonic required
const passwordsOK =
@ -593,6 +594,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
enableContinue = displayNameOK && mnemonicOK && passwordsOK;
} else if (signInMode === SignInMode.LinkingDevice) {
enableContinue = !!primaryDevicePubKey;
text = window.i18n('linkDevice');
} else if (signUpMode === SignUpMode.EnterDetails) {
enableContinue = displayNameOK && passwordsOK;
}
@ -604,7 +606,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
}}
buttonType={SessionButtonType.Brand}
buttonColor={SessionButtonColor.Green}
text={window.i18n('continueYourSession')}
text={text}
disabled={!enableContinue}
/>
);

Loading…
Cancel
Save