chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { User, Collection } from '../models';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import { User, Collection } from "../models";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export type Props = {
|
||||
actor: User,
|
||||
@@ -19,7 +19,7 @@ export type Props = {
|
||||
export const collectionNotificationEmailText = ({
|
||||
actor,
|
||||
collection,
|
||||
eventName = 'created',
|
||||
eventName = "created",
|
||||
}: Props) => `
|
||||
${collection.name}
|
||||
|
||||
@@ -31,7 +31,7 @@ Open Collection: ${process.env.URL}${collection.url}
|
||||
export const CollectionNotificationEmail = ({
|
||||
actor,
|
||||
collection,
|
||||
eventName = 'created',
|
||||
eventName = "created",
|
||||
unsubscribeUrl,
|
||||
}: Props) => {
|
||||
return (
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { User, Document, Team, Collection } from '../models';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import { User, Document, Team, Collection } from "../models";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export type Props = {
|
||||
actor: User,
|
||||
@@ -23,7 +23,7 @@ export const documentNotificationEmailText = ({
|
||||
team,
|
||||
document,
|
||||
collection,
|
||||
eventName = 'published',
|
||||
eventName = "published",
|
||||
}: Props) => `
|
||||
"${document.title}" ${eventName}
|
||||
|
||||
@@ -39,7 +39,7 @@ export const DocumentNotificationEmail = ({
|
||||
team,
|
||||
document,
|
||||
collection,
|
||||
eventName = 'published',
|
||||
eventName = "published",
|
||||
unsubscribeUrl,
|
||||
}: Props) => {
|
||||
return (
|
||||
@@ -51,7 +51,7 @@ export const DocumentNotificationEmail = ({
|
||||
"{document.title}" {eventName}
|
||||
</Heading>
|
||||
<p>
|
||||
{actor.name} {eventName} the document "{document.title}", in the{' '}
|
||||
{actor.name} {eventName} the document "{document.title}", in the{" "}
|
||||
{collection.name} collection.
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export const exportEmailText = `
|
||||
Your Data Export
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export type Props = {
|
||||
name: string,
|
||||
@@ -30,7 +30,7 @@ ${actorName} (${
|
||||
actorEmail
|
||||
}) has invited you to join Outline, a place for your team to build and share knowledge.
|
||||
|
||||
Join now: ${teamUrl}${guest ? '?guest=true' : ''}
|
||||
Join now: ${teamUrl}${guest ? "?guest=true" : ""}
|
||||
`;
|
||||
|
||||
export const InviteEmail = ({
|
||||
@@ -52,7 +52,7 @@ export const InviteEmail = ({
|
||||
</p>
|
||||
<EmptySpace height={10} />
|
||||
<p>
|
||||
<Button href={`${teamUrl}${guest ? '?guest=true' : ''}`}>
|
||||
<Button href={`${teamUrl}${guest ? "?guest=true" : ""}`}>
|
||||
Join now
|
||||
</Button>
|
||||
</p>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export type Props = {
|
||||
token: string,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import EmailTemplate from './components/EmailLayout';
|
||||
import Body from './components/Body';
|
||||
import Button from './components/Button';
|
||||
import Heading from './components/Heading';
|
||||
import Header from './components/Header';
|
||||
import Footer from './components/Footer';
|
||||
import EmptySpace from './components/EmptySpace';
|
||||
import * as React from "react";
|
||||
import EmailTemplate from "./components/EmailLayout";
|
||||
import Body from "./components/Body";
|
||||
import Button from "./components/Button";
|
||||
import Heading from "./components/Heading";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import EmptySpace from "./components/EmptySpace";
|
||||
|
||||
export type Props = {
|
||||
teamUrl: string,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { Table, TBody, TR, TD } from 'oy-vey';
|
||||
import * as React from "react";
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
|
||||
import EmptySpace from './EmptySpace';
|
||||
import EmptySpace from "./EmptySpace";
|
||||
|
||||
type Props = {
|
||||
children: React.Node,
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
type Props = { href: string, children: React.Node };
|
||||
|
||||
export default (props: Props) => {
|
||||
const style = {
|
||||
display: 'inline-block',
|
||||
padding: '10px 20px',
|
||||
color: '#FFFFFF',
|
||||
background: '#000000',
|
||||
borderRadius: '4px',
|
||||
display: "inline-block",
|
||||
padding: "10px 20px",
|
||||
color: "#FFFFFF",
|
||||
background: "#000000",
|
||||
borderRadius: "4px",
|
||||
fontWeight: 500,
|
||||
textDecoration: 'none',
|
||||
cursor: 'pointer',
|
||||
textDecoration: "none",
|
||||
cursor: "pointer",
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { Table, TBody, TR, TD } from 'oy-vey';
|
||||
import theme from '../../../shared/styles/theme';
|
||||
import * as React from "react";
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
import theme from "../../../shared/styles/theme";
|
||||
|
||||
type Props = {
|
||||
children: React.Node,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { Table, TBody, TR, TD } from 'oy-vey';
|
||||
import * as React from "react";
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
|
||||
const EmptySpace = ({ height }: { height?: number }) => {
|
||||
height = height || 16;
|
||||
const style = {
|
||||
lineHeight: `${height}px`,
|
||||
fontSize: '1px',
|
||||
msoLineHeightRule: 'exactly',
|
||||
fontSize: "1px",
|
||||
msoLineHeightRule: "exactly",
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -18,7 +18,7 @@ const EmptySpace = ({ height }: { height?: number }) => {
|
||||
width="100%"
|
||||
height={`${height}px`}
|
||||
style={style}
|
||||
dangerouslySetInnerHTML={{ __html: ' ' }}
|
||||
dangerouslySetInnerHTML={{ __html: " " }}
|
||||
/>
|
||||
</TR>
|
||||
</TBody>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { Table, TBody, TR, TD } from 'oy-vey';
|
||||
import { twitterUrl, spectrumUrl } from '../../../shared/utils/routeHelpers';
|
||||
import theme from '../../../shared/styles/theme';
|
||||
import * as React from "react";
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
import { twitterUrl, spectrumUrl } from "../../../shared/utils/routeHelpers";
|
||||
import theme from "../../../shared/styles/theme";
|
||||
|
||||
type Props = {
|
||||
unsubscribeUrl?: string,
|
||||
@@ -10,29 +10,29 @@ type Props = {
|
||||
|
||||
export default ({ unsubscribeUrl }: Props) => {
|
||||
const footerStyle = {
|
||||
padding: '20px 0',
|
||||
padding: "20px 0",
|
||||
borderTop: `1px solid ${theme.smokeDark}`,
|
||||
color: theme.slate,
|
||||
fontSize: '14px',
|
||||
fontSize: "14px",
|
||||
};
|
||||
|
||||
const unsubStyle = {
|
||||
padding: '0',
|
||||
padding: "0",
|
||||
color: theme.slate,
|
||||
fontSize: '14px',
|
||||
fontSize: "14px",
|
||||
};
|
||||
|
||||
const linkStyle = {
|
||||
color: theme.slate,
|
||||
fontWeight: 500,
|
||||
textDecoration: 'none',
|
||||
marginRight: '10px',
|
||||
textDecoration: "none",
|
||||
marginRight: "10px",
|
||||
};
|
||||
|
||||
const externalLinkStyle = {
|
||||
color: theme.slate,
|
||||
textDecoration: 'none',
|
||||
margin: '0 10px',
|
||||
textDecoration: "none",
|
||||
margin: "0 10px",
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { Table, TBody, TR, TD } from 'oy-vey';
|
||||
import EmptySpace from './EmptySpace';
|
||||
import * as React from "react";
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
import EmptySpace from "./EmptySpace";
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
const style = {
|
||||
fontWeight: 500,
|
||||
fontSize: '18px',
|
||||
fontSize: "18px",
|
||||
};
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// @flow
|
||||
import Koa from 'koa';
|
||||
import Router from 'koa-router';
|
||||
import { NotFoundError } from '../errors';
|
||||
import { Mailer } from '../mailer';
|
||||
import Koa from "koa";
|
||||
import Router from "koa-router";
|
||||
import { NotFoundError } from "../errors";
|
||||
import { Mailer } from "../mailer";
|
||||
|
||||
const emailPreviews = new Koa();
|
||||
const router = new Router();
|
||||
|
||||
router.get('/:type/:format', async ctx => {
|
||||
router.get("/:type/:format", async ctx => {
|
||||
let mailerOutput;
|
||||
let mailer = new Mailer();
|
||||
mailer.transporter = {
|
||||
@@ -21,13 +21,13 @@ router.get('/:type/:format', async ctx => {
|
||||
default:
|
||||
if (Object.getOwnPropertyNames(mailer).includes(ctx.params.type)) {
|
||||
// $FlowIssue flow doesn't like this but we're ok with it
|
||||
mailer[ctx.params.type]('user@example.com');
|
||||
} else throw new NotFoundError('Email template could not be found');
|
||||
mailer[ctx.params.type]("user@example.com");
|
||||
} else throw new NotFoundError("Email template could not be found");
|
||||
}
|
||||
|
||||
if (!mailerOutput) return;
|
||||
|
||||
if (ctx.params.format === 'text') {
|
||||
if (ctx.params.format === "text") {
|
||||
ctx.body = mailerOutput.text;
|
||||
} else {
|
||||
ctx.body = mailerOutput.html;
|
||||
|
||||
Reference in New Issue
Block a user