0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

chore(console): remove deprecated code about sign-in methods (#2391)

This commit is contained in:
Xiao Yijun 2022-11-11 10:37:05 +08:00 committed by GitHub
parent c814b8f3b3
commit 57802ac48b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 258 deletions

View file

@ -1,25 +0,0 @@
@use '@/scss/underscore' as _;
.title {
display: flex;
align-items: center;
.logo {
margin-right: _.unit(2);
width: 20px;
height: 20px;
img {
width: 20px;
height: 20px;
}
}
.icon {
width: 16px;
height: 16px;
object-fit: cover;
margin-left: _.unit(1);
color: var(--color-text-secondary);
}
}

View file

@ -1,80 +0,0 @@
import { ConnectorType } from '@logto/schemas';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import Alert from '@/components/Alert';
import Transfer from '@/components/Transfer';
import UnnamedTrans from '@/components/UnnamedTrans';
import useConnectorGroups from '@/hooks/use-connector-groups';
import ConnectorPlatformIcon from '@/icons/ConnectorPlatformIcon';
import * as styles from './ConnectorsTransfer.module.scss';
type Props = {
value: string[];
onChange: (value: string[]) => void;
};
const ConnectorsTransfer = ({ value, onChange }: Props) => {
const { data, error } = useConnectorGroups();
const isLoading = !data && !error;
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
if (isLoading) {
return <div>loading</div>;
}
if (!data && error) {
<div>{`error occurred: ${error.body?.message ?? error.message}`}</div>;
}
const datasource = data
? data
.filter(({ type }) => type === ConnectorType.Social)
.filter(({ enabled }) => enabled)
.map(({ target, name, connectors, logo }) => ({
value: target,
title: (
<div className={styles.title}>
<div className={styles.logo}>
<img src={logo} alt={target} />
</div>
<UnnamedTrans resource={name} />
{connectors.length > 1 &&
connectors
.filter(({ enabled }) => enabled)
.map(({ platform }) => (
<div key={platform} className={styles.icon}>
{platform && <ConnectorPlatformIcon platform={platform} />}
</div>
))}
</div>
),
}))
: [];
return (
<>
{datasource.length > 0 && value.length === 0 && (
<Alert>{t('sign_in_exp.setup_warning.no_added_social_connector')}</Alert>
)}
<Transfer
value={value}
datasource={datasource}
title={t('sign_in_exp.sign_in_methods.transfer.title')}
footer={
<div>
{t('sign_in_exp.sign_in_methods.transfer.footer.not_in_list')}{' '}
<Link to="/connectors/social" target="_blank">
{t('sign_in_exp.sign_in_methods.transfer.footer.set_up_more')}
</Link>{' '}
{t('sign_in_exp.sign_in_methods.transfer.footer.go_to')}
</div>
}
onChange={onChange}
/>
</>
);
};
export default ConnectorsTransfer;

View file

@ -91,28 +91,6 @@ const sign_in_exp = {
slogan: 'Slogan',
slogan_placeholder: 'Entfessle deine Kreativität',
},
sign_in_methods: {
title: 'ANMELDEMETHODEN',
primary: 'Primäre Anmeldemethode',
enable_secondary: 'Aktiviere sekundäre Anmeldemethoden',
enable_secondary_description:
'Sobald sie aktiviert ist, unterstützt deine App neben der primären Anmeldemethode noch weitere Anmeldemethoden. ',
methods: 'Anmeldemethode',
methods_sms: 'SMS Anmeldung',
methods_email: 'E-Mail Anmeldung',
methods_social: 'Social Anmeldung',
methods_username: 'Benutzername-und-Passwort Anmeldung',
methods_primary_tag: '(Primär)',
define_social_methods: 'Definiere die unterstützten Social Anmeldemethoden',
transfer: {
title: 'Social Connectoren',
footer: {
not_in_list: 'Nicht in der Liste?',
set_up_more: 'Mehr Social Connectoren einrichten',
go_to: 'oder "Connectoren" aufrufen.',
},
},
},
others: {
terms_of_use: {
title: 'NUTZUNGSBEDINGUNGEN',

View file

@ -89,28 +89,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.',
},
},
sign_in_methods: {
title: 'SIGN-IN METHODS',
primary: 'Primary sign-in method',
enable_secondary: 'Enable secondary sign in',
enable_secondary_description:
"Once it's turned on, you app will support more sign-in method(s) besides the primary one. ",
methods: 'Sign-in method',
methods_sms: 'Phone number sign in',
methods_email: 'Email sign in',
methods_social: 'Social sign in',
methods_username: 'Username-with-password sign in',
methods_primary_tag: '(Primary)',
define_social_methods: 'Define social sign-in methods',
transfer: {
title: 'Social connectors',
footer: {
not_in_list: 'Not in the list?',
set_up_more: 'Set up more',
go_to: 'social connectors or go to “Connectors” section.',
},
},
},
others: {
terms_of_use: {
title: 'TERMS OF USE',

View file

@ -91,28 +91,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.', // UNTRANSLATED
},
},
sign_in_methods: {
title: 'METHODES DE CONNEXION',
primary: 'Méthode de connexion principale',
enable_secondary: 'Activer une seconde méthode de connexion',
enable_secondary_description:
"Une fois qu'elle est activée, votre application prend en charge d'autres méthodes de connexion que la méthode principale. ",
methods: 'Méthode de connexion',
methods_sms: 'Connexion avec numéro de téléphone',
methods_email: 'Connexion avec email',
methods_social: 'Connexion avec social',
methods_username: "Connexion avec nom d'utilisateur et mot de passe",
methods_primary_tag: '(Principale)',
define_social_methods: "Définir les méthodes d'authentification sociale",
transfer: {
title: 'Connecteurs sociaux',
footer: {
not_in_list: 'Pas dans la liste ?',
set_up_more: 'Configurer plus',
go_to: 'connecteurs sociaux ou allez à la section "Connecteurs".',
},
},
},
others: {
terms_of_use: {
title: "CONDITIONS D'UTILISATION",

View file

@ -86,28 +86,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.', // UNTRANSLATED
},
},
sign_in_methods: {
title: '로그인 방법',
primary: '메인 로그인 방법',
enable_secondary: '백업 로그인 방법 활성화',
enable_secondary_description:
'백업 로그인 활성화를 통하여 메인 로그인 방법이외의 로그인 방법을 사용자에게 제공해보세요.',
methods: '로그인 방법',
methods_sms: 'SMS 로그인',
methods_email: '이메일 로그인',
methods_social: '소셜 로그인',
methods_username: '사용자 이름&비밀번호 로그인',
methods_primary_tag: '(메인)',
define_social_methods: '소셜 로그인 방법 설정',
transfer: {
title: '소셜 연동',
footer: {
not_in_list: '리스트에 없나요?',
set_up_more: '더 설정하기',
go_to: '를 눌러 설정하러 가기',
},
},
},
others: {
terms_of_use: {
title: '이용 약관',

View file

@ -89,28 +89,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.', // UNTRANSLATED
},
},
sign_in_methods: {
title: 'MÉTODOS DE LOGIN',
primary: 'Método de login principal',
enable_secondary: 'Ativar login secundário',
enable_secondary_description:
'Depois de ativado, a sua app oferecerá suporte a mais métodos de login além do principal. ',
methods: 'Método de login',
methods_sms: 'SMS',
methods_email: 'Email',
methods_social: 'Rede social',
methods_username: 'Utilizador e password',
methods_primary_tag: '(Primário)',
define_social_methods: 'Definir métodos de login social',
transfer: {
title: 'Conectores sociais',
footer: {
not_in_list: 'Não está na lista?',
set_up_more: 'Configurar mais',
go_to: 'conectores sociais ou vá para a seção "Conectores".',
},
},
},
others: {
terms_of_use: {
title: 'TERMOS DE USO',

View file

@ -90,28 +90,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.', // UNTRANSLATED
},
},
sign_in_methods: {
title: 'OTURUM AÇMA YÖNTEMLERİ',
primary: 'Birincil oturum açma yöntemi',
enable_secondary: 'İkincil oturum açmayı etkinleştir',
enable_secondary_description:
'Açıldığında, uygulamanız birincil yöntemin yanı sıra daha fazla oturum açma yöntemini destekleyecektir. ',
methods: 'Oturum açma yöntemi',
methods_sms: 'Telefon numarası girişi',
methods_email: 'E-posta adresi girişi',
methods_social: 'Sosyal platform girişi',
methods_username: 'Kullanıcı adı ve şifre ile oturum açma',
methods_primary_tag: '(Primary)',
define_social_methods: 'Sosyal platform oturum açma yöntemlerini tanımlama',
transfer: {
title: 'Social connectorlar',
footer: {
not_in_list: 'Listede yok?',
set_up_more: 'Daha fazlasını ayarla',
go_to: 'Social connectorlara veya “Connectors” bölümüne git.',
},
},
},
others: {
terms_of_use: {
title: 'KULLANIM KOŞULLARI',

View file

@ -87,27 +87,6 @@ const sign_in_exp = {
'This is essential as you have selected {{identifier}} as a required identifier.', // UNTRANSLATED
},
},
sign_in_methods: {
title: '登录方式',
primary: '主要登录方式',
enable_secondary: '启用其它登录方式',
enable_secondary_description: '开启后,除了主要登录方式,你的 app 将会支持更多其它的登录方式 ',
methods: '登录方式',
methods_sms: '手机号登录',
methods_email: '邮箱登录',
methods_social: '社交帐号登录',
methods_username: '用户名密码登录',
methods_primary_tag: '(主要)',
define_social_methods: '定义社交登录方式',
transfer: {
title: '社交连接器',
footer: {
not_in_list: '不在列表里?',
set_up_more: '设置更多',
go_to: '社交连接器,或前往连接器模块进行设置。',
},
},
},
others: {
terms_of_use: {
title: '使用条款',