2022-07-11 04:28:51 -05:00
|
|
|
import { AdminConsoleKey } 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 EmailConnector from '@/assets/images/connector-email.svg';
|
|
|
|
import SmsConnectorIcon from '@/assets/images/connector-sms.svg';
|
|
|
|
|
2022-05-26 00:07:52 -05:00
|
|
|
type TitlePlaceHolder = {
|
2022-07-11 04:28:51 -05:00
|
|
|
[key in ConnectorType]: AdminConsoleKey;
|
2022-05-26 00:07:52 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
export const connectorTitlePlaceHolder: TitlePlaceHolder = Object.freeze({
|
2022-07-11 04:28:51 -05:00
|
|
|
[ConnectorType.SMS]: 'connectors.type.sms',
|
|
|
|
[ConnectorType.Email]: 'connectors.type.email',
|
|
|
|
[ConnectorType.Social]: 'connectors.type.social',
|
2022-05-26 00:07:52 -05:00
|
|
|
});
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2022-07-08 00:49:22 -05:00
|
|
|
export const connectorPlaceholderIcon: ConnectorPlaceholderIcon = Object.freeze({
|
2022-06-26 21:04:46 -05:00
|
|
|
[ConnectorType.SMS]: SmsConnectorIcon,
|
|
|
|
[ConnectorType.Email]: EmailConnector,
|
|
|
|
} as const);
|