Create new edit profile page at /you

This commit is contained in:
Marquis Kurt 2019-04-27 14:33:56 -04:00
parent f68a37e908
commit 041be26533
3 changed files with 31 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import WelcomePage from './pages/Welcome';
import MessagesPage from './pages/Messages';
import RecommendationsPage from './pages/Recommendations';
import Missingno from './pages/Missingno';
import You from './pages/You';
import {withSnackbar} from 'notistack';
import {PrivateRoute} from './interfaces/overrides';
import { userLoggedIn } from './utilities/accounts';
@ -60,6 +61,7 @@ class App extends Component<any, any> {
<PrivateRoute path="/conversation/:conversationId" component={Conversation}/>
<PrivateRoute path="/search" component={SearchPage}/>
<PrivateRoute path="/settings" component={Settings}/>
<PrivateRoute path="/you" component={You}/>
<PrivateRoute path="/about" component={AboutPage}/>
<PrivateRoute path="/compose" component={Composer}/>
<PrivateRoute path="/recommended" component={RecommendationsPage}/>

View File

@ -30,6 +30,7 @@ import {themes, defaultTheme} from '../types/HyperspaceTheme';
import ThemePreview from '../components/ThemePreview';
import {setHyperspaceTheme, getHyperspaceTheme} from '../utilities/themes';
import { Visibility } from '../types/Visibility';
import {LinkableButton} from '../interfaces/overrides';
interface ISettingsState {
darkModeEnabled: boolean;
@ -310,9 +311,15 @@ class SettingsPage extends Component<any, ISettingsState> {
</List>
</Paper>
<br/>
<ListSubheader>Accounts</ListSubheader>
<ListSubheader>Your Account</ListSubheader>
<Paper className={classes.pageListConstraints}>
<List>
<ListItem>
<ListItemText primary="Edit your profile" secondary="Change your bio, display name, and images"/>
<ListItemSecondaryAction>
<LinkableButton to="/you">Edit</LinkableButton>
</ListItemSecondaryAction>
</ListItem>
<ListItem>
<ListItemText primary="Configure on Mastodon"/>
<ListItemSecondaryAction>

21
src/pages/You.tsx Normal file
View File

@ -0,0 +1,21 @@
import React, {Component} from 'react';
import {withStyles, Typography, Paper, Avatar, Button, TextField} from '@material-ui/core';
import {withSnackbar, withSnackbarProps} from 'notistack';
import {styles} from './PageLayout.styles';
interface IYouProps extends withSnackbarProps {
classes: any;
}
class You extends Component<IYouProps, any> {
render() {
const {classes} = this.props;
return (
<div className={classes.pageLayoutConstraints}>
</div>
);
}
}
export default withStyles(styles)(withSnackbar(You));