0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

fix(console,phrases): remove SSO connectors status tags (#4979)

This commit is contained in:
Darcy Ye 2023-11-28 12:40:57 +08:00 committed by GitHub
parent 0aa70cd5a7
commit 532b7bb5e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 94 deletions

View file

@ -1,5 +1,5 @@
import { withAppInsights } from '@logto/app-insights/react';
import { type SsoConnectorWithProviderConfig, SsoProviderName } from '@logto/schemas';
import { type SsoConnectorWithProviderConfig } from '@logto/schemas';
import { conditional } from '@silverhand/essentials';
import { useTranslation } from 'react-i18next';
import { useLocation } from 'react-router-dom';
@ -72,7 +72,7 @@ function EnterpriseSsoConnectors() {
{
title: t('enterprise_sso.col_connector_name'),
dataIndex: 'name',
colSpan: 256,
colSpan: 5,
render: ({ id, connectorName, ...rest }) => (
<ItemPreview
title={connectorName}
@ -90,7 +90,7 @@ function EnterpriseSsoConnectors() {
{
title: t('enterprise_sso.col_type'),
dataIndex: 'type',
colSpan: 256,
colSpan: 4,
render: ({ name }) => (
<div className={styles.type}>
<span>{name}</span>
@ -100,7 +100,7 @@ function EnterpriseSsoConnectors() {
{
title: t('enterprise_sso.col_email_domain'),
dataIndex: 'emailDomain',
colSpan: 326,
colSpan: 7,
render: ({ domains }) =>
domains.length === 0 ? (
'-'
@ -115,27 +115,6 @@ function EnterpriseSsoConnectors() {
</div>
),
},
{
title: t('enterprise_sso.col_status'),
dataIndex: 'status',
colSpan: 186,
render: ({ providerConfig, providerName }) => {
const inUse = [
SsoProviderName.OIDC,
SsoProviderName.GOOGLE_WORKSPACE,
SsoProviderName.OKTA,
].includes(providerName)
? Boolean(providerConfig)
: Boolean(providerConfig?.identityProvider);
return (
<Tag type="state" status={inUse ? 'success' : 'error'} variant="plain">
{t(
inUse ? 'enterprise_sso.col_status_in_use' : 'enterprise_sso.col_status_invalid'
)}
</Tag>
);
},
},
],
rowClickHandler: ({ id }) => {
navigate(buildDetailsPathname(id));

View file

@ -1,5 +1,5 @@
import { withAppInsights } from '@logto/app-insights/react';
import { SsoProviderName } from '@logto/schemas';
import { type SsoProviderName } from '@logto/schemas';
import { pick } from '@silverhand/essentials';
import { useEffect, useState } from 'react';
import { toast } from 'react-hot-toast';
@ -25,10 +25,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname';
import useUserAssetsService from '@/hooks/use-user-assets-service';
import SsoConnectorLogo from '../EnterpriseSso/SsoConnectorLogo';
import {
type SsoConnectorWithProviderConfigWithGeneric,
type ParsedSsoIdentityProviderConfig,
} from '../EnterpriseSso/types';
import { type SsoConnectorWithProviderConfigWithGeneric } from '../EnterpriseSso/types';
import Connection from './Connection';
import Settings from './Settings';
@ -59,19 +56,6 @@ function EnterpriseSsoConnectorDetails<T extends SsoProviderName>() {
{ keepPreviousData: true }
);
const inUse =
ssoConnector &&
([SsoProviderName.OIDC, SsoProviderName.GOOGLE_WORKSPACE, SsoProviderName.OKTA].includes(
ssoConnector.providerName
)
? Boolean(ssoConnector.providerConfig)
: Boolean(
ssoConnector.providerConfig &&
// eslint-disable-next-line no-restricted-syntax
(ssoConnector.providerConfig as ParsedSsoIdentityProviderConfig<SsoProviderName.SAML>)
.identityProvider
));
const isLoading = isSsoConnectorLoading || isUserAssetServiceLoading;
const api = useApi();
@ -132,12 +116,6 @@ function EnterpriseSsoConnectorDetails<T extends SsoProviderName>() {
}
title={ssoConnector.connectorName}
primaryTag={ssoConnector.name}
statusTag={{
status: inUse ? 'success' : 'error',
text: inUse
? 'enterprise_sso.col_status_in_use'
: 'enterprise_sso.col_status_invalid',
}}
identifier={{ name: 'ID', value: ssoConnector.id }}
additionalActionButton={{
title: 'enterprise_sso_details.check_readme',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Connector-Name',
col_type: 'Typ',
col_email_domain: 'E-Mail-Domain',
col_status: 'Status',
col_status_in_use: 'In Verwendung',
col_status_invalid: 'Ungültig',
placeholder_title: 'Unternehmensconnector',
placeholder_description:
'Logto hat viele integrierte Unternehmensidentitätsanbieter zur Verbindung bereitgestellt. Gleichzeitig können Sie Ihren eigenen Anbieter mit Standardprotokollen erstellen.',

View file

@ -6,9 +6,7 @@ const enterprise_sso = {
col_connector_name: 'Connector name',
col_type: 'Type',
col_email_domain: 'Email domain',
col_status: 'Status',
col_status_in_use: 'In use',
col_status_invalid: 'Invalid',
placeholder_title: 'Enterprise connector',
placeholder_description:
'Logto has provided many built-in enterprise identity providers to connect, meantime you can create your own with standard protocols.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Nombre del conector',
col_type: 'Tipo',
col_email_domain: 'Dominio de correo electrónico',
col_status: 'Estado',
col_status_in_use: 'En uso',
col_status_invalid: 'Inválido',
placeholder_title: 'Conector de la empresa',
placeholder_description:
'Logto ha proporcionado muchos proveedores de identidad empresariales integrados para conectarse, al mismo tiempo, puedes crear el tuyo propio con protocolos estándar.',

View file

@ -8,9 +8,7 @@ const enterprise_sso = {
/** UNTRANSLATED */
col_type: 'Type',
col_email_domain: 'Domaine de messagerie',
col_status: 'Statut',
col_status_in_use: 'Utilisé',
col_status_invalid: 'Invalide',
placeholder_title: "Connecteur d'entreprise",
placeholder_description:
"Logto a fourni de nombreux fournisseurs d'identité d'entreprise intégrés à connecter. Vous pouvez également créer le vôtre avec des protocoles standard.",

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Nome connettore',
col_type: 'Tipo',
col_email_domain: 'Dominio email',
col_status: 'Stato',
col_status_in_use: 'In uso',
col_status_invalid: 'Non valido',
placeholder_title: 'Connettore aziendale',
placeholder_description:
'Logto ha fornito numerosi provider di identità aziendale integrati, nel frattempo puoi creare il tuo con protocolli standard.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'コネクター名',
col_type: 'タイプ',
col_email_domain: 'メールドメイン',
col_status: 'ステータス',
col_status_in_use: '使用中',
col_status_invalid: '無効',
placeholder_title: 'エンタープライズコネクター',
placeholder_description:
'Logtoは多くの組み込み企業向けアイデンティティプロバイダーを提供しており、同時に標準プロトコルで独自のプロバイダーを作成することもできます。',

View file

@ -6,9 +6,7 @@ const enterprise_sso = {
col_connector_name: '커넥터 이름',
col_type: '유형',
col_email_domain: '이메일 도메인',
col_status: '상태',
col_status_in_use: '사용 중',
col_status_invalid: '유효하지 않음',
placeholder_title: '기업 커넥터',
placeholder_description:
'Logto는 많은 내장 기업 신원 공급자를 제공했으며, 동시에 표준 프로토콜로 사용자 정의할 수 있습니다.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Nazwa łącznika',
col_type: 'Typ',
col_email_domain: 'Domena e-mail',
col_status: 'Status',
col_status_in_use: 'W użyciu',
col_status_invalid: 'Nieprawidłowy',
placeholder_title: 'Łącznik przedsiębiorstwa',
placeholder_description:
'Logto udostępniło wiele wbudowanych dostawców tożsamości przedsiębiorstw, możesz także stworzyć własnego zgodnego ze standardowymi protokołami.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Nome do conector',
col_type: 'Tipo',
col_email_domain: 'Domínio de e-mail',
col_status: 'Status',
col_status_in_use: 'Em uso',
col_status_invalid: 'Inválido',
placeholder_title: 'Conector empresarial',
placeholder_description:
'O Logto forneceu muitos provedores de identidade empresarial integrados para conexão. Ao mesmo tempo, você pode criar o seu próprio com protocolos padrão.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Nome do conector',
col_type: 'Tipo',
col_email_domain: 'Domínio do email',
col_status: 'Estado',
col_status_in_use: 'Em uso',
col_status_invalid: 'Inválido',
placeholder_title: 'Conector empresarial',
placeholder_description:
'O Logto forneceu muitos provedores de identidade empresarial integrados para conectar, ao mesmo tempo, você pode criar o seu próprio com protocolos padrão.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Имя коннектора',
col_type: 'Тип',
col_email_domain: 'Домен электронной почты',
col_status: 'Статус',
col_status_in_use: 'Используется',
col_status_invalid: 'Недопустимый',
placeholder_title: 'Коннектор предприятия',
placeholder_description:
'Logto предоставил множество встроенных поставщиков идентификации предприятия для подключения, тем временем вы можете создать своего с использованием стандартных протоколов.',

View file

@ -7,9 +7,7 @@ const enterprise_sso = {
col_connector_name: 'Bağlayıcı adı',
col_type: 'Tür',
col_email_domain: 'E-posta etki alanı',
col_status: 'Durum',
col_status_in_use: 'Kullanılıyor',
col_status_invalid: 'Geçersiz',
placeholder_title: 'Kurumsal bağlayıcı',
placeholder_description:
'Logto, birçok yerleşik kurumsal kimlik sağlayıcı sunmuştur, aynı zamanda standart protokollerle kendi kimlik sağlayıcınızı oluşturabilirsiniz.',

View file

@ -6,9 +6,7 @@ const enterprise_sso = {
col_connector_name: '连接器名称',
col_type: '类型',
col_email_domain: '电子邮件域',
col_status: '状态',
col_status_in_use: '正在使用',
col_status_invalid: '无效',
placeholder_title: '企业连接器',
placeholder_description:
'Logto已提供许多内置的企业身份提供者来连接同时您可以使用标准协议创建您自己的提供者。',

View file

@ -6,9 +6,7 @@ const enterprise_sso = {
col_connector_name: '連接器名稱',
col_type: '類型',
col_email_domain: '電子郵件域名',
col_status: '狀態',
col_status_in_use: '使用中',
col_status_invalid: '無效',
placeholder_title: '企業連接器',
placeholder_description:
'Logto已提供許多內建的企業身份提供者進行連接同時您也可以通過標準協議創建自己的企業身份提供者。',

View file

@ -6,9 +6,7 @@ const enterprise_sso = {
col_connector_name: '連接器名稱',
col_type: '類型',
col_email_domain: '電子郵件域',
col_status: '狀態',
col_status_in_use: '使用中',
col_status_invalid: '無效',
placeholder_title: '企業連接器',
placeholder_description:
'Logto 提供了許多內置的企業身份提供者以便連接,同時你也可以使用標準協議創建自己的企業身份提供者。',