2022-10-21 00:14:17 -05:00
|
|
|
import type { 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-08-31 23:21:42 -05:00
|
|
|
[ConnectorType.Sms]: 'connectors.type.sms',
|
2022-07-11 04:28:51 -05:00
|
|
|
[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-08-31 23:21:42 -05:00
|
|
|
[ConnectorType.Sms]: SmsConnectorIcon,
|
2022-06-26 21:04:46 -05:00
|
|
|
[ConnectorType.Email]: EmailConnector,
|
|
|
|
} as const);
|