Merge pull request #453 from outline/jori/feedback

Added feedback link
This commit is contained in:
Tom Moor 2017-11-28 20:31:42 -08:00 committed by GitHub
commit 9f3e739952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 28 deletions

View File

@ -5,6 +5,7 @@ import { inject, observer } from 'mobx-react';
import UiStore from 'stores/UiStore'; import UiStore from 'stores/UiStore';
import AuthStore from 'stores/AuthStore'; import AuthStore from 'stores/AuthStore';
import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu'; import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu';
import { spectrumUrl } from '../../shared/utils/routeHelpers';
@observer @observer
class AccountMenu extends Component { class AccountMenu extends Component {
@ -32,6 +33,10 @@ class AccountMenu extends Component {
window.location.href = BASE_URL; window.location.href = BASE_URL;
}; };
handleFeedback = () => {
window.location.href = spectrumUrl();
};
render() { render() {
return ( return (
<DropdownMenu <DropdownMenu
@ -47,6 +52,9 @@ class AccountMenu extends Component {
<DropdownMenuItem onClick={this.handleApi}> <DropdownMenuItem onClick={this.handleApi}>
API documentation API documentation
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={this.handleFeedback}>
Feedback
</DropdownMenuItem>
<DropdownMenuItem onClick={this.handleLogout}>Logout</DropdownMenuItem> <DropdownMenuItem onClick={this.handleLogout}>Logout</DropdownMenuItem>
</DropdownMenu> </DropdownMenu>
); );

View File

@ -6,7 +6,7 @@ import Grid from 'styled-components-grid';
import breakpoint from 'styled-components-breakpoint'; import breakpoint from 'styled-components-breakpoint';
import Hero from './components/Hero'; import Hero from './components/Hero';
import SignupButton from './components/SignupButton'; import SignupButton from './components/SignupButton';
import { developers, githubUrl } from '../utils/routeHelpers'; import { developers, githubUrl } from '../../shared/utils/routeHelpers';
import { color } from '../../shared/styles/constants'; import { color } from '../../shared/styles/constants';
function Home() { function Home() {

View File

@ -9,7 +9,7 @@ import {
spectrumUrl, spectrumUrl,
blogUrl, blogUrl,
twitterUrl, twitterUrl,
} from '../../utils/routeHelpers'; } from '../../../shared/utils/routeHelpers';
import { color } from '../../../shared/styles/constants'; import { color } from '../../../shared/styles/constants';
function TopNavigation() { function TopNavigation() {

View File

@ -1,7 +1,7 @@
// @flow // @flow
import React from 'react'; import React from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import { signin } from '../../utils/routeHelpers'; import { signin } from '../../../shared/utils/routeHelpers';
import SlackLogo from '../../../shared/components/SlackLogo'; import SlackLogo from '../../../shared/components/SlackLogo';
import { color } from '../../../shared/styles/constants'; import { color } from '../../../shared/styles/constants';

View File

@ -1,25 +0,0 @@
// @flow
export function githubUrl(): string {
return 'https://www.github.com/outline';
}
export function blogUrl(): string {
return 'https://medium.com/getoutline';
}
export function twitterUrl(): string {
return 'https://twitter.com/getoutline';
}
export function spectrumUrl(): string {
return 'https://spectrum.chat/outline';
}
export function developers(): string {
return '/developers';
}
export function signin(): string {
return '/auth/slack';
}

View File

@ -24,3 +24,27 @@ export function slackAuth(
return `${baseUrl}?${urlParams}`; return `${baseUrl}?${urlParams}`;
} }
export function githubUrl(): string {
return 'https://www.github.com/outline';
}
export function blogUrl(): string {
return 'https://medium.com/getoutline';
}
export function twitterUrl(): string {
return 'https://twitter.com/getoutline';
}
export function spectrumUrl(): string {
return 'https://spectrum.chat/outline';
}
export function developers(): string {
return '/developers';
}
export function signin(): string {
return '/auth/slack';
}