2022-06-05 22:36:58 -05:00
|
|
|
import { AdminConsoleKey, I18nKey } from '@logto/phrases';
|
2022-05-30 00:51:11 -05:00
|
|
|
import { ConnectorPlatform, ConnectorType } from '@logto/schemas';
|
2022-05-26 00:07:52 -05:00
|
|
|
|
2022-06-26 21:04:46 -05:00
|
|
|
import EmailConnectorDark from '@/assets/images/connector-email-dark.svg';
|
|
|
|
import EmailConnector from '@/assets/images/connector-email.svg';
|
|
|
|
import SmsConnectorIconDark from '@/assets/images/connector-sms-dark.svg';
|
|
|
|
import SmsConnectorIcon from '@/assets/images/connector-sms.svg';
|
|
|
|
|
2022-05-26 00:07:52 -05:00
|
|
|
type TitlePlaceHolder = {
|
|
|
|
[key in ConnectorType]: I18nKey;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const connectorTitlePlaceHolder: TitlePlaceHolder = Object.freeze({
|
|
|
|
[ConnectorType.SMS]: 'admin_console.connectors.type.sms',
|
|
|
|
[ConnectorType.Email]: 'admin_console.connectors.type.email',
|
|
|
|
[ConnectorType.Social]: 'admin_console.connectors.type.social',
|
|
|
|
});
|
|
|
|
|
2022-05-30 00:51:11 -05:00
|
|
|
type ConnectorPlatformLabel = {
|
2022-06-05 22:36:58 -05:00
|
|
|
[key in ConnectorPlatform]: AdminConsoleKey;
|
2022-05-30 00:51:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
export const connectorPlatformLabel: ConnectorPlatformLabel = Object.freeze({
|
2022-06-05 22:36:58 -05:00
|
|
|
[ConnectorPlatform.Native]: 'connectors.platform.native',
|
|
|
|
[ConnectorPlatform.Universal]: 'connectors.platform.universal',
|
|
|
|
[ConnectorPlatform.Web]: 'connectors.platform.web',
|
2022-05-30 00:51:11 -05:00
|
|
|
});
|
2022-06-26 21:04:46 -05:00
|
|
|
|
|
|
|
type ConnectorPlaceholderIcon = {
|
|
|
|
[key in ConnectorType]?: SvgComponent;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const lightModeConnectorPlaceholderIcon: ConnectorPlaceholderIcon = Object.freeze({
|
|
|
|
[ConnectorType.SMS]: SmsConnectorIcon,
|
|
|
|
[ConnectorType.Email]: EmailConnector,
|
|
|
|
} as const);
|
|
|
|
|
|
|
|
export const darkModeConnectorPlaceholderIcon: ConnectorPlaceholderIcon = Object.freeze({
|
|
|
|
[ConnectorType.SMS]: SmsConnectorIconDark,
|
|
|
|
[ConnectorType.Email]: EmailConnectorDark,
|
|
|
|
} as const);
|