fix: sync icons
BIN
packages/nc-mail-assets/icons/Attachment.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
packages/nc-mail-assets/icons/Checkbox.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/nc-mail-assets/icons/Currency.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
packages/nc-mail-assets/icons/Date.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
packages/nc-mail-assets/icons/DateTime.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
packages/nc-mail-assets/icons/Decimal.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
packages/nc-mail-assets/icons/Duration.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
packages/nc-mail-assets/icons/Email.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
packages/nc-mail-assets/icons/GeoData.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
packages/nc-mail-assets/icons/Geometry.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/nc-mail-assets/icons/JSON.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/nc-mail-assets/icons/LinkToAnotherRecord.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
packages/nc-mail-assets/icons/Links.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
packages/nc-mail-assets/icons/LongText.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
packages/nc-mail-assets/icons/MultiSelect.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
packages/nc-mail-assets/icons/Number.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
packages/nc-mail-assets/icons/Percent.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
packages/nc-mail-assets/icons/PhoneNumber.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
packages/nc-mail-assets/icons/Rating.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/nc-mail-assets/icons/SingleLineText.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
packages/nc-mail-assets/icons/SingleSelect.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
packages/nc-mail-assets/icons/SpecificDBType.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
packages/nc-mail-assets/icons/Time.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
packages/nc-mail-assets/icons/URL.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
packages/nc-mail-assets/icons/User.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
packages/nc-mail-assets/icons/Year.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
packages/nc-mail-assets/icons/form-view.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
@@ -2,7 +2,13 @@ import { Container, Img, Section } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { NC_EMAIL_ASSETS_BASE_URL } from '~/constants';
|
||||
|
||||
export const ContentWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
export const ContentWrapper = ({
|
||||
children,
|
||||
disableContainerPadding,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
disableContainerPadding?: boolean;
|
||||
}) => {
|
||||
return (
|
||||
<Container className="px-3 my-16 max-w-[480px]">
|
||||
<Section className="py-6 m-auto bg-gray-50 border border-gray-200 border-solid rounded-t-xl">
|
||||
@@ -14,7 +20,11 @@ export const ContentWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
height={40}
|
||||
/>
|
||||
</Section>
|
||||
<Section className="p-6 border border-gray-200 border-solid border-t-0 rounded-b-xl bg-white">
|
||||
<Section
|
||||
className={`border border-gray-200 border-solid border-t-0 rounded-b-xl bg-white ${
|
||||
disableContainerPadding ? 'p-0' : 'p-6'
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
</Section>
|
||||
</Container>
|
||||
|
||||
110
packages/nocodb/src/services/mail/templates/form-submission.tsx
Normal file
@@ -0,0 +1,110 @@
|
||||
import {
|
||||
Body,
|
||||
Button,
|
||||
Column,
|
||||
Head,
|
||||
Heading,
|
||||
Hr,
|
||||
Html,
|
||||
Img,
|
||||
Preview,
|
||||
Row,
|
||||
Section,
|
||||
Text,
|
||||
} from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
ContentWrapper,
|
||||
Footer,
|
||||
RootWrapper,
|
||||
} from '~/services/mail/templates/components';
|
||||
import { NC_EMAIL_ASSETS_BASE_URL } from '~/constants';
|
||||
|
||||
interface FormSubmissionTemplateProps {
|
||||
formTitle: string;
|
||||
tableTitle: string;
|
||||
baseTitle: string;
|
||||
}
|
||||
|
||||
const FormSubmission = ({
|
||||
formTitle,
|
||||
baseTitle,
|
||||
tableTitle,
|
||||
}: FormSubmissionTemplateProps) => (
|
||||
<Html>
|
||||
<RootWrapper>
|
||||
<Head />
|
||||
<Preview>You have a new response!</Preview>
|
||||
<Body className="bg-white">
|
||||
<ContentWrapper disableContainerPadding>
|
||||
<Section className="p-6 mx-auto">
|
||||
<Heading className="text-gray-900 text-center font-bold m-auto text-xl md:text-2xl">
|
||||
You have a new response!
|
||||
</Heading>
|
||||
|
||||
<Section
|
||||
align="center"
|
||||
className="my-6"
|
||||
style={{ textAlign: 'center', lineHeight: '28px' }}
|
||||
>
|
||||
<table
|
||||
cellpadding="0"
|
||||
cellspacing="0"
|
||||
style={{ display: 'inline-block', verticalAlign: 'middle' }}
|
||||
>
|
||||
<tr>
|
||||
<td style={{ paddingRight: '8px', verticalAlign: 'middle' }}>
|
||||
<Img
|
||||
src={`${NC_EMAIL_ASSETS_BASE_URL}/icons/form-view.png`}
|
||||
alt="Form View Icon"
|
||||
height={28}
|
||||
width={28}
|
||||
className="!h-6 inline-block"
|
||||
style={{ verticalAlign: 'middle' }}
|
||||
/>
|
||||
</td>
|
||||
<td style={{ verticalAlign: 'middle' }}>
|
||||
<span
|
||||
className="text-base font-bold text-gray-900"
|
||||
style={{
|
||||
verticalAlign: 'middle',
|
||||
display: 'inline-block',
|
||||
lineHeight: '28px',
|
||||
}}
|
||||
>
|
||||
{formTitle}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</Section>
|
||||
|
||||
<Text className="text-center font-weight-thin text-gray-600 !my-0">
|
||||
Someone has responded to your form, a record has been added to
|
||||
<span className="font-bold text-gray-800"> {tableTitle} </span>
|
||||
in
|
||||
<span className="font-bold text-gray-800"> {baseTitle}</span>.
|
||||
</Text>
|
||||
</Section>
|
||||
|
||||
<Hr />
|
||||
|
||||
<Section className="p-6 mx-auto">
|
||||
<Text className="text-lg font-bold text-center !mt-0 !mb-6">
|
||||
Here is a copy of the response
|
||||
</Text>
|
||||
</Section>
|
||||
</ContentWrapper>
|
||||
<Footer />
|
||||
</Body>
|
||||
</RootWrapper>
|
||||
</Html>
|
||||
);
|
||||
|
||||
FormSubmission.PreviewProps = {
|
||||
formTitle: 'Form Name',
|
||||
tableTitle: 'Table Name',
|
||||
baseTitle: 'Base Name',
|
||||
};
|
||||
|
||||
export default FormSubmission;
|
||||