// @flow import * as React from 'react'; import { observer, inject } from 'mobx-react'; import { DocumentIcon, EmailIcon, ProfileIcon, PadlockIcon, CodeIcon, UserIcon, LinkIcon, TeamIcon, } 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 AuthStore from 'stores/AuthStore'; type Props = { history: Object, auth: AuthStore, }; @observer class SettingsSidebar extends React.Component { returnToDashboard = () => { this.props.history.push('/'); }; render() { const { team, user } = this.props.auth; if (!team || !user) return null; return (
Account
} label="Profile" /> } label="Notifications" /> } label="API Tokens" />
Team
{user.isAdmin && ( } label="Details" /> )} {user.isAdmin && ( } label="Security" /> )} } exact={false} label="People" /> } label="Share Links" /> {user.isAdmin && ( } label="Export Data" /> )}
{user.isAdmin && (
Integrations
} label="Slack" /> } label="Zapier" />
)}
); } } export default inject('auth')(SettingsSidebar);