8 } from '@proton/shared/lib/mail/mailSettings';
10 export const getSwipeAction = (swipeAction: SWIPE_ACTION) => {
11 switch (swipeAction) {
12 case SWIPE_ACTION.Archive:
14 case SWIPE_ACTION.MarkAsRead:
16 case SWIPE_ACTION.Spam:
18 case SWIPE_ACTION.Star:
20 case SWIPE_ACTION.Trash:
24 export const getPageSize = (pageSize: MAIL_PAGE_SIZE) => {
26 case MAIL_PAGE_SIZE.FIFTY:
28 case MAIL_PAGE_SIZE.ONE_HUNDRED:
30 case MAIL_PAGE_SIZE.TWO_HUNDRED:
35 export const getDelaySecond = (delay: DELAY_IN_SECONDS) => {
37 case DELAY_IN_SECONDS.NONE:
39 case DELAY_IN_SECONDS.SMALL:
41 case DELAY_IN_SECONDS.MEDIUM:
43 case DELAY_IN_SECONDS.LARGE:
48 export const getNextMessageOnMove = (nextOnMove: NEXT_MESSAGE_ON_MOVE) => {
50 case NEXT_MESSAGE_ON_MOVE.DEFAULT:
52 case NEXT_MESSAGE_ON_MOVE.DISABLED:
54 case NEXT_MESSAGE_ON_MOVE.ENABLED:
59 export const getFontFace = (fontFace: string | null) => {
67 export const getFontSize = (fontSize: number | null) => {
72 return fontSize.toString();
75 export const getPGPScheme = (pgpScheme: PACKAGE_TYPE) => {
77 case PACKAGE_TYPE.SEND_PGP_INLINE:
79 case PACKAGE_TYPE.SEND_PGP_MIME:
81 case PACKAGE_TYPE.SEND_CLEAR:
83 case PACKAGE_TYPE.SEND_CLEAR_MIME:
85 case PACKAGE_TYPE.SEND_EO:
87 case PACKAGE_TYPE.SEND_PM:
92 export const imageProxy = (imageProxy: IMAGE_PROXY_FLAGS) => {
94 case IMAGE_PROXY_FLAGS.NONE:
96 case IMAGE_PROXY_FLAGS.INCORPORATOR:
98 case IMAGE_PROXY_FLAGS.PROXY:
100 case IMAGE_PROXY_FLAGS.ALL:
105 export const getAddressRange = (addresss?: any[]) => {
110 if (addresss.length < 10) {
111 return addresss.length.toString();
117 export const getArrayLengthRange = (arr?: any[]) => {
122 if (arr.length < 10) {
123 return arr.length.toString();
126 if (arr.length < 20) {
130 if (arr.length < 50) {