chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import styled from 'styled-components';
|
||||
import * as React from "react";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import styled from "styled-components";
|
||||
import {
|
||||
ArchiveIcon,
|
||||
HomeIcon,
|
||||
@@ -10,25 +10,25 @@ import {
|
||||
StarredIcon,
|
||||
TrashIcon,
|
||||
PlusIcon,
|
||||
} from 'outline-icons';
|
||||
} from "outline-icons";
|
||||
|
||||
import Flex from 'shared/components/Flex';
|
||||
import Modal from 'components/Modal';
|
||||
import Invite from 'scenes/Invite';
|
||||
import AccountMenu from 'menus/AccountMenu';
|
||||
import Sidebar from './Sidebar';
|
||||
import Scrollable from 'components/Scrollable';
|
||||
import Section from './components/Section';
|
||||
import Collections from './components/Collections';
|
||||
import SidebarLink from './components/SidebarLink';
|
||||
import HeaderBlock from './components/HeaderBlock';
|
||||
import Bubble from './components/Bubble';
|
||||
import Flex from "shared/components/Flex";
|
||||
import Modal from "components/Modal";
|
||||
import Invite from "scenes/Invite";
|
||||
import AccountMenu from "menus/AccountMenu";
|
||||
import Sidebar from "./Sidebar";
|
||||
import Scrollable from "components/Scrollable";
|
||||
import Section from "./components/Section";
|
||||
import Collections from "./components/Collections";
|
||||
import SidebarLink from "./components/SidebarLink";
|
||||
import HeaderBlock from "./components/HeaderBlock";
|
||||
import Bubble from "./components/Bubble";
|
||||
|
||||
import AuthStore from 'stores/AuthStore';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
import PoliciesStore from 'stores/PoliciesStore';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import { observable } from 'mobx';
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import { observable } from "mobx";
|
||||
|
||||
type Props = {
|
||||
auth: AuthStore,
|
||||
@@ -47,7 +47,7 @@ class MainSidebar extends React.Component<Props> {
|
||||
|
||||
handleCreateCollection = (ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
this.props.ui.setActiveModal('collection-new');
|
||||
this.props.ui.setActiveModal("collection-new");
|
||||
};
|
||||
|
||||
handleInviteModalOpen = (ev: SyntheticEvent<>) => {
|
||||
@@ -90,7 +90,7 @@ class MainSidebar extends React.Component<Props> {
|
||||
/>
|
||||
<SidebarLink
|
||||
to={{
|
||||
pathname: '/search',
|
||||
pathname: "/search",
|
||||
state: { fromMenu: true },
|
||||
}}
|
||||
icon={<SearchIcon color="currentColor" />}
|
||||
@@ -172,4 +172,4 @@ const Drafts = styled(Flex)`
|
||||
height: 24px;
|
||||
`;
|
||||
|
||||
export default inject('documents', 'policies', 'auth', 'ui')(MainSidebar);
|
||||
export default inject("documents", "policies", "auth", "ui")(MainSidebar);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import type { RouterHistory } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import * as React from "react";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import {
|
||||
DocumentIcon,
|
||||
EmailIcon,
|
||||
@@ -15,20 +15,20 @@ import {
|
||||
TeamIcon,
|
||||
BulletedListIcon,
|
||||
ExpandedIcon,
|
||||
} from 'outline-icons';
|
||||
import ZapierIcon from './icons/Zapier';
|
||||
import SlackIcon from './icons/Slack';
|
||||
} from "outline-icons";
|
||||
import ZapierIcon from "./icons/Zapier";
|
||||
import SlackIcon from "./icons/Slack";
|
||||
|
||||
import Flex from 'shared/components/Flex';
|
||||
import Sidebar from './Sidebar';
|
||||
import Scrollable from 'components/Scrollable';
|
||||
import Section from './components/Section';
|
||||
import Header from './components/Header';
|
||||
import SidebarLink from './components/SidebarLink';
|
||||
import HeaderBlock from './components/HeaderBlock';
|
||||
import Version from './components/Version';
|
||||
import PoliciesStore from 'stores/PoliciesStore';
|
||||
import AuthStore from 'stores/AuthStore';
|
||||
import Flex from "shared/components/Flex";
|
||||
import Sidebar from "./Sidebar";
|
||||
import Scrollable from "components/Scrollable";
|
||||
import Section from "./components/Section";
|
||||
import Header from "./components/Header";
|
||||
import SidebarLink from "./components/SidebarLink";
|
||||
import HeaderBlock from "./components/HeaderBlock";
|
||||
import Version from "./components/Version";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory,
|
||||
@@ -39,7 +39,7 @@ type Props = {
|
||||
@observer
|
||||
class SettingsSidebar extends React.Component<Props> {
|
||||
returnToDashboard = () => {
|
||||
this.props.history.push('/');
|
||||
this.props.history.push("/");
|
||||
};
|
||||
|
||||
render() {
|
||||
@@ -146,7 +146,7 @@ class SettingsSidebar extends React.Component<Props> {
|
||||
</Section>
|
||||
)}
|
||||
{can.update &&
|
||||
process.env.DEPLOYMENT !== 'hosted' && (
|
||||
process.env.DEPLOYMENT !== "hosted" && (
|
||||
<Section>
|
||||
<Header>Installation</Header>
|
||||
<Version />
|
||||
@@ -168,4 +168,4 @@ const ReturnToApp = styled(Flex)`
|
||||
height: 16px;
|
||||
`;
|
||||
|
||||
export default inject('auth', 'policies')(SettingsSidebar);
|
||||
export default inject("auth", "policies")(SettingsSidebar);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import type { Location } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import breakpoint from 'styled-components-breakpoint';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { CloseIcon, MenuIcon } from 'outline-icons';
|
||||
import Fade from 'components/Fade';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { Location } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import { CloseIcon, MenuIcon } from "outline-icons";
|
||||
import Fade from "components/Fade";
|
||||
import Flex from "shared/components/Flex";
|
||||
import UiStore from "stores/UiStore";
|
||||
|
||||
let firstRender = true;
|
||||
|
||||
@@ -69,7 +69,7 @@ const Container = styled(Flex)`
|
||||
width: 100%;
|
||||
background: ${props => props.theme.sidebarBackground};
|
||||
transition: left 100ms ease-out, ${props => props.theme.backgroundTransition};
|
||||
margin-left: ${props => (props.mobileSidebarVisible ? 0 : '-100%')};
|
||||
margin-left: ${props => (props.mobileSidebarVisible ? 0 : "-100%")};
|
||||
z-index: 1000;
|
||||
|
||||
@media print {
|
||||
@@ -79,7 +79,7 @@ const Container = styled(Flex)`
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
content: "";
|
||||
background: ${props => props.theme.sidebarBackground};
|
||||
position: absolute;
|
||||
top: -50vh;
|
||||
@@ -93,7 +93,7 @@ const Container = styled(Flex)`
|
||||
bottom: -50vh;
|
||||
}
|
||||
|
||||
${breakpoint('tablet')`
|
||||
${breakpoint("tablet")`
|
||||
left: ${props => (props.editMode ? `-${props.theme.sidebarWidth}` : 0)};
|
||||
width: ${props => props.theme.sidebarWidth};
|
||||
margin: 0;
|
||||
@@ -106,14 +106,14 @@ const Toggle = styled.a`
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: ${props => (props.mobileSidebarVisible ? 'auto' : 0)};
|
||||
right: ${props => (props.mobileSidebarVisible ? 0 : 'auto')};
|
||||
left: ${props => (props.mobileSidebarVisible ? "auto" : 0)};
|
||||
right: ${props => (props.mobileSidebarVisible ? 0 : "auto")};
|
||||
z-index: 1;
|
||||
margin: 12px;
|
||||
|
||||
${breakpoint('tablet')`
|
||||
${breakpoint("tablet")`
|
||||
display: none;
|
||||
`};
|
||||
`;
|
||||
|
||||
export default withRouter(inject('ui')(Sidebar));
|
||||
export default withRouter(inject("ui")(Sidebar));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { bounceIn } from 'shared/styles/animations';
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import { bounceIn } from "shared/styles/animations";
|
||||
|
||||
type Props = {
|
||||
count: number,
|
||||
@@ -17,7 +17,7 @@ const Count = styled.div`
|
||||
color: ${props => props.theme.white};
|
||||
background: ${props => props.theme.slateDark};
|
||||
display: inline-block;
|
||||
font-feature-settings: 'tnum';
|
||||
font-feature-settings: "tnum";
|
||||
font-weight: 600;
|
||||
font-size: 9px;
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer } from 'mobx-react';
|
||||
import { observable } from 'mobx';
|
||||
import Collection from 'models/Collection';
|
||||
import Document from 'models/Document';
|
||||
import CollectionMenu from 'menus/CollectionMenu';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
import SidebarLink from './SidebarLink';
|
||||
import DocumentLink from './DocumentLink';
|
||||
import CollectionIcon from 'components/CollectionIcon';
|
||||
import DropToImport from 'components/DropToImport';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import * as React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { observable } from "mobx";
|
||||
import Collection from "models/Collection";
|
||||
import Document from "models/Document";
|
||||
import CollectionMenu from "menus/CollectionMenu";
|
||||
import UiStore from "stores/UiStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import SidebarLink from "./SidebarLink";
|
||||
import DocumentLink from "./DocumentLink";
|
||||
import CollectionIcon from "components/CollectionIcon";
|
||||
import DropToImport from "components/DropToImport";
|
||||
import Flex from "shared/components/Flex";
|
||||
|
||||
type Props = {
|
||||
collection: Collection,
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { withRouter, type RouterHistory } from 'react-router-dom';
|
||||
import keydown from 'react-keydown';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import { PlusIcon } from 'outline-icons';
|
||||
import { newDocumentUrl } from 'utils/routeHelpers';
|
||||
import * as React from "react";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import { withRouter, type RouterHistory } from "react-router-dom";
|
||||
import keydown from "react-keydown";
|
||||
import Flex from "shared/components/Flex";
|
||||
import { PlusIcon } from "outline-icons";
|
||||
import { newDocumentUrl } from "utils/routeHelpers";
|
||||
|
||||
import Header from './Header';
|
||||
import SidebarLink from './SidebarLink';
|
||||
import CollectionLink from './CollectionLink';
|
||||
import CollectionsLoading from './CollectionsLoading';
|
||||
import Fade from 'components/Fade';
|
||||
import Header from "./Header";
|
||||
import SidebarLink from "./SidebarLink";
|
||||
import CollectionLink from "./CollectionLink";
|
||||
import CollectionsLoading from "./CollectionsLoading";
|
||||
import Fade from "components/Fade";
|
||||
|
||||
import CollectionsStore from 'stores/CollectionsStore';
|
||||
import PoliciesStore from 'stores/PoliciesStore';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory,
|
||||
@@ -39,7 +39,7 @@ class Collections extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
@keydown('n')
|
||||
@keydown("n")
|
||||
goToNewDocument() {
|
||||
if (this.props.ui.editMode) return;
|
||||
|
||||
@@ -94,6 +94,6 @@ class Collections extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default inject('collections', 'ui', 'documents', 'policies')(
|
||||
export default inject("collections", "ui", "documents", "policies")(
|
||||
withRouter(Collections)
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Mask from 'components/Mask';
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import Mask from "components/Mask";
|
||||
|
||||
function CollectionsLoading() {
|
||||
return (
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer } from 'mobx-react';
|
||||
import { observable } from 'mobx';
|
||||
import styled from 'styled-components';
|
||||
import Document from 'models/Document';
|
||||
import DocumentMenu from 'menus/DocumentMenu';
|
||||
import SidebarLink from './SidebarLink';
|
||||
import DropToImport from 'components/DropToImport';
|
||||
import Fade from 'components/Fade';
|
||||
import Collection from 'models/Collection';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import { type NavigationNode } from 'types';
|
||||
import * as React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { observable } from "mobx";
|
||||
import styled from "styled-components";
|
||||
import Document from "models/Document";
|
||||
import DocumentMenu from "menus/DocumentMenu";
|
||||
import SidebarLink from "./SidebarLink";
|
||||
import DropToImport from "components/DropToImport";
|
||||
import Fade from "components/Fade";
|
||||
import Collection from "models/Collection";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import Flex from "shared/components/Flex";
|
||||
import { type NavigationNode } from "types";
|
||||
|
||||
type Props = {
|
||||
node: NavigationNode,
|
||||
@@ -96,7 +96,7 @@ class DocumentLink extends React.Component<Props> {
|
||||
state: { title: node.title },
|
||||
}}
|
||||
expanded={showChildren ? true : undefined}
|
||||
label={node.title || 'Untitled'}
|
||||
label={node.title || "Untitled"}
|
||||
depth={depth}
|
||||
exact={false}
|
||||
menuOpen={this.menuOpen}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import Flex from 'shared/components/Flex';
|
||||
import styled from 'styled-components';
|
||||
import Flex from "shared/components/Flex";
|
||||
import styled from "styled-components";
|
||||
|
||||
const Header = styled(Flex)`
|
||||
font-size: 11px;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import styled, { withTheme } from 'styled-components';
|
||||
import { ExpandedIcon } from 'outline-icons';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import TeamLogo from 'shared/components/TeamLogo';
|
||||
import * as React from "react";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import { ExpandedIcon } from "outline-icons";
|
||||
import Flex from "shared/components/Flex";
|
||||
import TeamLogo from "shared/components/TeamLogo";
|
||||
|
||||
type Props = {
|
||||
teamName: string,
|
||||
@@ -26,7 +26,7 @@ function HeaderBlock({
|
||||
<TeamLogo alt={`${teamName} logo`} src={logoUrl} />
|
||||
<Flex align="flex-start" column>
|
||||
<TeamName showDisclosure>
|
||||
{teamName}{' '}
|
||||
{teamName}{" "}
|
||||
{showDisclosure && <StyledExpandedIcon color={theme.text} />}
|
||||
</TeamName>
|
||||
<Subheading>{subheading}</Subheading>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import styled from 'styled-components';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import styled from "styled-components";
|
||||
import Flex from "shared/components/Flex";
|
||||
|
||||
const Section = styled(Flex)`
|
||||
position: relative;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observable, action } from 'mobx';
|
||||
import { observer } from 'mobx-react';
|
||||
import { withRouter, NavLink } from 'react-router-dom';
|
||||
import { CollapsedIcon } from 'outline-icons';
|
||||
import styled, { withTheme } from 'styled-components';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import * as React from "react";
|
||||
import { observable, action } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { withRouter, NavLink } from "react-router-dom";
|
||||
import { CollapsedIcon } from "outline-icons";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import Flex from "shared/components/Flex";
|
||||
|
||||
type Props = {
|
||||
to?: string | Object,
|
||||
@@ -82,7 +82,7 @@ class SidebarLink extends React.Component<Props> {
|
||||
onClick={onClick}
|
||||
exact={exact !== false}
|
||||
to={to}
|
||||
as={to ? undefined : href ? 'a' : 'div'}
|
||||
as={to ? undefined : href ? "a" : "div"}
|
||||
href={href}
|
||||
>
|
||||
{icon && <IconWrapper>{icon}</IconWrapper>}
|
||||
@@ -108,7 +108,7 @@ const IconWrapper = styled.span`
|
||||
`;
|
||||
|
||||
const Action = styled.span`
|
||||
display: ${props => (props.menuOpen ? 'inline' : 'none')};
|
||||
display: ${props => (props.menuOpen ? "inline" : "none")};
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
@@ -168,7 +168,7 @@ const Disclosure = styled(CollapsedIcon)`
|
||||
position: absolute;
|
||||
left: -24px;
|
||||
|
||||
${({ expanded }) => !expanded && 'transform: rotate(-90deg);'};
|
||||
${({ expanded }) => !expanded && "transform: rotate(-90deg);"};
|
||||
`;
|
||||
|
||||
export default withRouter(withTheme(SidebarLink));
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Badge from 'components/Badge';
|
||||
import SidebarLink from './SidebarLink';
|
||||
import { version } from '../../../../package.json';
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import Badge from "components/Badge";
|
||||
import SidebarLink from "./SidebarLink";
|
||||
import { version } from "../../../../package.json";
|
||||
|
||||
export default function Version() {
|
||||
// $FlowFixMe
|
||||
@@ -14,7 +14,7 @@ export default function Version() {
|
||||
async function loadReleases() {
|
||||
let out = 0;
|
||||
const res = await fetch(
|
||||
'https://api.github.com/repos/outline/outline/releases'
|
||||
"https://api.github.com/repos/outline/outline/releases"
|
||||
);
|
||||
const releases = await res.json();
|
||||
for (const release of releases) {
|
||||
@@ -37,9 +37,9 @@ export default function Version() {
|
||||
<br />
|
||||
<LilBadge>
|
||||
{releasesBehind === 0
|
||||
? 'Up to date'
|
||||
? "Up to date"
|
||||
: `${releasesBehind} version${
|
||||
releasesBehind === 1 ? '' : 's'
|
||||
releasesBehind === 1 ? "" : "s"
|
||||
} behind`}
|
||||
</LilBadge>
|
||||
</React.Fragment>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
type Props = {
|
||||
color?: string,
|
||||
};
|
||||
|
||||
export default function SlackIcon({ color = '#4E5C6E' }: Props) {
|
||||
export default function SlackIcon({ color = "#4E5C6E" }: Props) {
|
||||
return (
|
||||
<svg
|
||||
fill={color}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
type Props = {
|
||||
color?: string,
|
||||
};
|
||||
|
||||
export default function ZapierIcon({ color = '#4E5C6E' }: Props) {
|
||||
export default function ZapierIcon({ color = "#4E5C6E" }: Props) {
|
||||
return (
|
||||
<svg
|
||||
fill={color}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// @flow
|
||||
import Sidebar from './Main';
|
||||
import Sidebar from "./Main";
|
||||
export default Sidebar;
|
||||
|
||||
Reference in New Issue
Block a user