Со страницы выбора аккаунтов удалена ссылка на создание нового аккаунта

This commit is contained in:
ErickSkrauch 2017-03-07 01:43:33 +03:00
parent 148caba4a6
commit 23e7b811fe
9 changed files with 4 additions and 31 deletions

View File

@ -2,6 +2,5 @@
"chooseAccountTitle": "Choose an account",
"addAccount": "Log into another account",
"logoutAll": "Log out from all accounts",
"createNewAccount": "Create new account",
"description": "You have logged in into multiple accounts. Please choose the one, you want to use to authorize {appName}"
}

View File

@ -10,11 +10,7 @@ export default factory({
},
links: [
{
label: messages.createNewAccount
},
{
label: messages.logoutAll,
payload: {logout: true}
label: messages.logoutAll
}
]
});

View File

@ -20,7 +20,6 @@
"components.auth.appInfo.useItYourself": "Наведайце нашу {link}, каб даведацца, як выкарыстоўваць гэты сэрвіс ў сваіх праектах.",
"components.auth.chooseAccount.addAccount": "Увайсці ў другі акаўнт",
"components.auth.chooseAccount.chooseAccountTitle": "Выбар акаўнта",
"components.auth.chooseAccount.createNewAccount": "Стварыць новы акаўнт",
"components.auth.chooseAccount.description": "Вы выканалі ўваход у некалькі акаўнтаў. Пазначце, які вы жадаеце выкарыстаць для аўтарызацыі {appName}",
"components.auth.chooseAccount.logoutAll": "Выйсці з усіх акаўнтаў",
"components.auth.finish.authForAppFailed": "Аўтарызацыя для {appName} не атрымалася",

View File

@ -20,7 +20,6 @@
"components.auth.appInfo.useItYourself": "Visit our {link}, to learn how to use this service in you projects.",
"components.auth.chooseAccount.addAccount": "Log into another account",
"components.auth.chooseAccount.chooseAccountTitle": "Choose an account",
"components.auth.chooseAccount.createNewAccount": "Create new account",
"components.auth.chooseAccount.description": "You have logged in into multiple accounts. Please choose the one, you want to use to authorize {appName}",
"components.auth.chooseAccount.logoutAll": "Log out from all accounts",
"components.auth.finish.authForAppFailed": "Authorization for {appName} was failed",

View File

@ -20,7 +20,6 @@
"components.auth.appInfo.useItYourself": "Visite nossa {link} para aprender a como usar esse serviço nos seus projetos.",
"components.auth.chooseAccount.addAccount": "Entrar em outra conta",
"components.auth.chooseAccount.chooseAccountTitle": "Escolha uma conta",
"components.auth.chooseAccount.createNewAccount": "Criar uma nova conta",
"components.auth.chooseAccount.description": "Você entrou em múltiplas contas. Por favor selecione a que você quer usar para autorizar {appName}",
"components.auth.chooseAccount.logoutAll": "Desconectar de todas as contas",
"components.auth.finish.authForAppFailed": "Autorização para {appName} falhou.",

View File

@ -20,7 +20,6 @@
"components.auth.appInfo.useItYourself": "Посетите нашу {link}, чтобы узнать, как использовать этот сервис в своих проектах.",
"components.auth.chooseAccount.addAccount": "Войти в другой аккаунт",
"components.auth.chooseAccount.chooseAccountTitle": "Выбор аккаунта",
"components.auth.chooseAccount.createNewAccount": "Создать новый аккаунт",
"components.auth.chooseAccount.description": "Вы выполнили вход в несколько аккаунтов. Укажите, какой вы хотите использовать для авторизации {appName}",
"components.auth.chooseAccount.logoutAll": "Выйти из всех аккаунтов",
"components.auth.finish.authForAppFailed": "Авторизация для {appName} не удалась",

View File

@ -20,7 +20,6 @@
"components.auth.appInfo.useItYourself": "Відвідайте нашу {link}, щоб дізнатися, як використовувати цей сервіс в своїх проектах.",
"components.auth.chooseAccount.addAccount": "Увійти в інший акаунт",
"components.auth.chooseAccount.chooseAccountTitle": "Оберіть акаунт",
"components.auth.chooseAccount.createNewAccount": "Створити новий акаунт",
"components.auth.chooseAccount.description": "Ви увійшли у декілька акаунтів. Будь ласка, оберіть акаунт, який ви бажаєте використовувати для авторизації {appName}",
"components.auth.chooseAccount.logoutAll": "Вийти з усіх аккаунтів",
"components.auth.finish.authForAppFailed": "Авторизація для {appName} не вдалася",

View File

@ -1,7 +1,6 @@
import AbstractState from './AbstractState';
import LoginState from './LoginState';
import CompleteState from './CompleteState';
import RegisterState from './RegisterState';
export default class ChooseAccountState extends AbstractState {
enter(context) {
@ -17,16 +16,7 @@ export default class ChooseAccountState extends AbstractState {
}
}
/**
* @param {object} context
* @param {object} payload
* @param {bool} [payload.logout=false]
*/
reject(context, payload = {}) {
if (payload.logout) {
context.run('logout');
} else {
context.setState(new RegisterState());
}
reject(context) {
context.run('logout');
}
}

View File

@ -1,7 +1,6 @@
import ChooseAccountState from 'services/authFlow/ChooseAccountState';
import CompleteState from 'services/authFlow/CompleteState';
import LoginState from 'services/authFlow/LoginState';
import RegisterState from 'services/authFlow/RegisterState';
import { bootstrap, expectState, expectNavigate, expectRun } from './helpers';
@ -46,16 +45,10 @@ describe('ChooseAccountState', () => {
});
describe('#reject', () => {
it('should transition to register', () => {
expectState(mock, RegisterState);
state.reject(context);
});
it('should logout', () => {
expectRun(mock, 'logout');
state.reject(context, {logout: true});
state.reject(context);
});
});
});