mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
fix(deps): update typescript-projects (#11927)
* fix(deps): update typescript-projects * chore: clean up --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Img, Link, Section, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { ImmichButton } from 'src/emails/components/button.component';
|
||||
import ImmichLayout from 'src/emails/components/immich.layout';
|
||||
import { AlbumInviteEmailProps } from 'src/interfaces/notification.interface';
|
||||
import { ImmichButton } from './components/button.component';
|
||||
import ImmichLayout from './components/immich.layout';
|
||||
|
||||
export const AlbumInviteEmail = ({
|
||||
baseUrl,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Img, Link, Section, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { ImmichButton } from 'src/emails/components/button.component';
|
||||
import ImmichLayout from 'src/emails/components/immich.layout';
|
||||
import { AlbumUpdateEmailProps } from 'src/interfaces/notification.interface';
|
||||
import { ImmichButton } from './components/button.component';
|
||||
import ImmichLayout from './components/immich.layout';
|
||||
|
||||
export const AlbumUpdateEmail = ({ baseUrl, albumName, recipientName, albumId, cid }: AlbumUpdateEmailProps) => (
|
||||
<ImmichLayout preview="New media has been added to a shared album.">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Body, Container, Font, Head, Hr, Html, Img, Preview, Section, Tailwind, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { ImmichFooter } from './footer.template';
|
||||
import { ImmichFooter } from 'src/emails/components/footer.template';
|
||||
|
||||
interface ImmichLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -11,6 +11,7 @@ export const ImmichLayout = ({ children, preview }: ImmichLayoutProps) => (
|
||||
<Html>
|
||||
<Tailwind
|
||||
config={{
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module
|
||||
presets: [require('tailwindcss-preset-email')],
|
||||
theme: {
|
||||
extend: {
|
||||
|
||||
@@ -1,22 +1,7 @@
|
||||
import {
|
||||
Body,
|
||||
Button,
|
||||
Column,
|
||||
Container,
|
||||
Head,
|
||||
Hr,
|
||||
Html,
|
||||
Img,
|
||||
Link,
|
||||
Preview,
|
||||
Row,
|
||||
Section,
|
||||
Text,
|
||||
} from '@react-email/components';
|
||||
import * as CSS from 'csstype';
|
||||
import { Link, Section, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { ImmichButton } from './components/button.component';
|
||||
import FutoLayout from './components/futo.layout';
|
||||
import { ImmichButton } from 'src/emails/components/button.component';
|
||||
import FutoLayout from 'src/emails/components/futo.layout';
|
||||
|
||||
/**
|
||||
* Template to be used for FUTOPay project
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Link, Row, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import ImmichLayout from 'src/emails/components/immich.layout';
|
||||
import { TestEmailProps } from 'src/interfaces/notification.interface';
|
||||
import ImmichLayout from './components/immich.layout';
|
||||
|
||||
export const TestEmail = ({ baseUrl, displayName }: TestEmailProps) => (
|
||||
<ImmichLayout preview="This is a test email from Immich.">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Link, Section, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
import { ImmichButton } from 'src/emails/components/button.component';
|
||||
import ImmichLayout from 'src/emails/components/immich.layout';
|
||||
import { WelcomeEmailProps } from 'src/interfaces/notification.interface';
|
||||
import { ImmichButton } from './components/button.component';
|
||||
import ImmichLayout from './components/immich.layout';
|
||||
|
||||
export const WelcomeEmail = ({ baseUrl, displayName, username, password }: WelcomeEmailProps) => (
|
||||
<ImmichLayout preview="You have been invited to a new Immich instance.">
|
||||
|
||||
@@ -90,7 +90,7 @@ export type SendEmailResponse = {
|
||||
};
|
||||
|
||||
export interface INotificationRepository {
|
||||
renderEmail(request: EmailRenderRequest): { html: string; text: string };
|
||||
renderEmail(request: EmailRenderRequest): Promise<{ html: string; text: string }>;
|
||||
sendEmail(options: SendEmailOptions): Promise<SendEmailResponse>;
|
||||
verifySmtp(options: SmtpOptions): Promise<true>;
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ export class NotificationRepository implements INotificationRepository {
|
||||
}
|
||||
}
|
||||
|
||||
renderEmail(request: EmailRenderRequest): { html: string; text: string } {
|
||||
async renderEmail(request: EmailRenderRequest): Promise<{ html: string; text: string }> {
|
||||
const component = this.render(request);
|
||||
const html = render(component, { pretty: true });
|
||||
const text = render(component, { plainText: true });
|
||||
const html = await render(component, { pretty: true });
|
||||
const text = await render(component, { plainText: true });
|
||||
return { html, text };
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class NotificationService {
|
||||
}
|
||||
|
||||
const { server } = await this.configCore.getConfig({ withCache: false });
|
||||
const { html, text } = this.notificationRepository.renderEmail({
|
||||
const { html, text } = await this.notificationRepository.renderEmail({
|
||||
template: EmailTemplate.TEST_EMAIL,
|
||||
data: {
|
||||
baseUrl: server.externalDomain || DEFAULT_EXTERNAL_DOMAIN,
|
||||
@@ -113,7 +113,7 @@ export class NotificationService {
|
||||
}
|
||||
|
||||
const { server } = await this.configCore.getConfig({ withCache: true });
|
||||
const { html, text } = this.notificationRepository.renderEmail({
|
||||
const { html, text } = await this.notificationRepository.renderEmail({
|
||||
template: EmailTemplate.WELCOME,
|
||||
data: {
|
||||
baseUrl: server.externalDomain || DEFAULT_EXTERNAL_DOMAIN,
|
||||
@@ -156,7 +156,7 @@ export class NotificationService {
|
||||
const attachment = await this.getAlbumThumbnailAttachment(album);
|
||||
|
||||
const { server } = await this.configCore.getConfig({ withCache: false });
|
||||
const { html, text } = this.notificationRepository.renderEmail({
|
||||
const { html, text } = await this.notificationRepository.renderEmail({
|
||||
template: EmailTemplate.ALBUM_INVITE,
|
||||
data: {
|
||||
baseUrl: server.externalDomain || DEFAULT_EXTERNAL_DOMAIN,
|
||||
@@ -211,7 +211,7 @@ export class NotificationService {
|
||||
continue;
|
||||
}
|
||||
|
||||
const { html, text } = this.notificationRepository.renderEmail({
|
||||
const { html, text } = await this.notificationRepository.renderEmail({
|
||||
template: EmailTemplate.ALBUM_UPDATE,
|
||||
data: {
|
||||
baseUrl: server.externalDomain || DEFAULT_EXTERNAL_DOMAIN,
|
||||
|
||||
Reference in New Issue
Block a user