diff --git a/index.html b/index.html index 61017f2..ab5cf04 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - +
{sender.name}
+${faker.lorem.paragraphs(2)}
`, + isRead: faker.datatype.boolean(), + isFlagged: faker.datatype.boolean(), + hasAttachment: faker.datatype.boolean(), + size: faker.number.int({ min: 1024, max: 16384 }), +}); + +export const getMockedMails = (count = 3) => ({ + emails: Array.from({ length: count }, () => { + const mail = getMockedMail(); + return { + id: mail.id, + threadId: mail.threadId, + from: mail.from, + to: mail.to, + subject: mail.subject, + receivedAt: mail.receivedAt, + preview: mail.preview, + isRead: mail.isRead, + isFlagged: mail.isFlagged, + hasAttachment: mail.hasAttachment, + size: mail.size, + }; + }), + total: faker.number.int({ min: count, max: 500 }), +}); + +export const getMockedMailBoxes = () => [ + { + id: faker.string.uuid(), + name: 'Inbox', + type: 'inbox', + parentId: null, + totalEmails: faker.number.int({ min: 50, max: 500 }), + unreadEmails: faker.number.int({ min: 0, max: 20 }), + }, + { + id: faker.string.uuid(), + name: 'Sent', + type: 'sent', + parentId: null, + totalEmails: faker.number.int({ min: 10, max: 200 }), + unreadEmails: 0, + }, + { + id: faker.string.uuid(), + name: 'Drafts', + type: 'drafts', + parentId: null, + totalEmails: faker.number.int({ min: 0, max: 20 }), + unreadEmails: 0, + }, + { + id: faker.string.uuid(), + name: 'Spam', + type: 'spam', + parentId: null, + totalEmails: faker.number.int({ min: 0, max: 50 }), + unreadEmails: faker.number.int({ min: 0, max: 50 }), + }, + { + id: faker.string.uuid(), + name: 'Trash', + type: 'trash', + parentId: null, + totalEmails: faker.number.int({ min: 0, max: 30 }), + unreadEmails: 0, + }, +];