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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { signin } from '../../utils/routeHelpers';
import { signin } from '../../../shared/utils/routeHelpers';
import SlackLogo from '../../../shared/components/SlackLogo';
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}`;
}
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';
}