chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { find } from 'lodash';
|
||||
import styled from 'styled-components';
|
||||
import * as React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { find } from "lodash";
|
||||
import styled from "styled-components";
|
||||
|
||||
import Button from 'components/Button';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
import PageTitle from 'components/PageTitle';
|
||||
import HelpText from 'components/HelpText';
|
||||
import SlackButton from './components/SlackButton';
|
||||
import CollectionsStore from 'stores/CollectionsStore';
|
||||
import IntegrationsStore from 'stores/IntegrationsStore';
|
||||
import AuthStore from 'stores/AuthStore';
|
||||
import Notice from 'shared/components/Notice';
|
||||
import getQueryVariable from 'shared/utils/getQueryVariable';
|
||||
import Button from "components/Button";
|
||||
import CenteredContent from "components/CenteredContent";
|
||||
import PageTitle from "components/PageTitle";
|
||||
import HelpText from "components/HelpText";
|
||||
import SlackButton from "./components/SlackButton";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import IntegrationsStore from "stores/IntegrationsStore";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import Notice from "shared/components/Notice";
|
||||
import getQueryVariable from "shared/utils/getQueryVariable";
|
||||
|
||||
type Props = {
|
||||
collections: CollectionsStore,
|
||||
@@ -26,39 +26,39 @@ class Slack extends React.Component<Props> {
|
||||
error: ?string;
|
||||
|
||||
componentDidMount() {
|
||||
this.error = getQueryVariable('error');
|
||||
this.error = getQueryVariable("error");
|
||||
this.props.collections.fetchPage({ limit: 100 });
|
||||
this.props.integrations.fetchPage();
|
||||
}
|
||||
|
||||
get commandIntegration() {
|
||||
return find(this.props.integrations.slackIntegrations, {
|
||||
type: 'command',
|
||||
type: "command",
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { collections, integrations, auth } = this.props;
|
||||
const teamId = auth.team ? auth.team.id : '';
|
||||
const teamId = auth.team ? auth.team.id : "";
|
||||
|
||||
return (
|
||||
<CenteredContent>
|
||||
<PageTitle title="Slack" />
|
||||
<h1>Slack</h1>
|
||||
{this.error === 'access_denied' && (
|
||||
{this.error === "access_denied" && (
|
||||
<Notice>
|
||||
Whoops, you need to accept the permissions in Slack to connect
|
||||
Outline to your team. Try again?
|
||||
</Notice>
|
||||
)}
|
||||
{this.error === 'unauthenticated' && (
|
||||
{this.error === "unauthenticated" && (
|
||||
<Notice>
|
||||
Something went wrong while authenticating your request. Please try
|
||||
logging in again?
|
||||
</Notice>
|
||||
)}
|
||||
<HelpText>
|
||||
Preview Outline links your team mates share and use the{' '}
|
||||
Preview Outline links your team mates share and use the{" "}
|
||||
<Code>/outline</Code> slash command in Slack to search for documents
|
||||
in your team’s wiki.
|
||||
</HelpText>
|
||||
@@ -67,7 +67,7 @@ class Slack extends React.Component<Props> {
|
||||
<Button onClick={this.commandIntegration.delete}>Disconnect</Button>
|
||||
) : (
|
||||
<SlackButton
|
||||
scopes={['commands', 'links:read', 'links:write']}
|
||||
scopes={["commands", "links:read", "links:write"]}
|
||||
redirectUri={`${BASE_URL}/auth/slack.commands`}
|
||||
state={teamId}
|
||||
/>
|
||||
@@ -91,7 +91,7 @@ class Slack extends React.Component<Props> {
|
||||
return (
|
||||
<ListItem key={integration.id}>
|
||||
<span>
|
||||
<strong>{collection.name}</strong> posting activity to the{' '}
|
||||
<strong>{collection.name}</strong> posting activity to the{" "}
|
||||
<strong>{integration.settings.channel}</strong> Slack
|
||||
channel
|
||||
</span>
|
||||
@@ -104,7 +104,7 @@ class Slack extends React.Component<Props> {
|
||||
<ListItem key={collection.id}>
|
||||
<strong>{collection.name}</strong>
|
||||
<SlackButton
|
||||
scopes={['incoming-webhook']}
|
||||
scopes={["incoming-webhook"]}
|
||||
redirectUri={`${BASE_URL}/auth/slack.post`}
|
||||
state={collection.id}
|
||||
label="Connect"
|
||||
@@ -139,4 +139,4 @@ const Code = styled.code`
|
||||
border-radius: 4px;
|
||||
`;
|
||||
|
||||
export default inject('collections', 'integrations', 'auth')(Slack);
|
||||
export default inject("collections", "integrations", "auth")(Slack);
|
||||
|
||||
Reference in New Issue
Block a user