Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import { escapeUTF8 } from 'entities'
import { capitalizeString } from '../../../common/shared.js'
import { UserModel } from '../../users/models/user.model.js'
export const defaultFooter = 'If you no longer wish to receive notifications, change your preferences directly from your user space.'
export const mailTemplate = (content: string, footer: string) => `
<html lang="en">
<meta charset="utf-8"/>
<body>
<div>
${content}
</div>
<small style="color:#666">
--
${footer}
</small>
</body
</html>`
export const mailAuthor = (author: UserModel) =>
`<img style="border-radius: 50% !important; vertical-align: middle; object-fit: cover;" height="40" width="40" src="${escapeUTF8(author.avatarBase64 ?? '')}" alt="avatar"> <b>${escapeUTF8(author.fullName)}</b> `
export const mailEventOnElement = (event: string, element: string) => `${escapeUTF8(event)}: <b>${escapeUTF8(capitalizeString(element))}</b>`
export const mailItalicContent = (content: string) => `<p><i>${escapeUTF8(content)}</i></p>`