display continue session signin with seed

pull/881/head
Audric Ackermann 5 years ago
parent 0b25ab7fac
commit 15738c3525
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

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

@ -74,7 +74,10 @@
newMembers.length + existingMembers.length > newMembers.length + existingMembers.length >
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT 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({ window.pushToast({
title: msg, title: msg,

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

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

Loading…
Cancel
Save