mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
User profile page (#102)
* Added mock profile page * Added translations * Modularized page, added LoginProvider, started validation * Re-adding profile route after router refactoring * Added API calls for password and name change * Added user deletion modal * Refactored translations in profile-page to match new locales * Fixed merge-conflicted locales/de.json * Removed values for password fields * Fixed capitalization of LoginProvider * Fixed codestyle method declarations * Fix names of methods and started countdown * Fix countdown Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
515cf1f34d
commit
747d9686fa
13 changed files with 356 additions and 13 deletions
|
@ -9,7 +9,7 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { UserAvatar } from '../../user-avatar/user-avatar'
|
||||
|
||||
export const UserDropdown: React.FC = () => {
|
||||
useTranslation();
|
||||
useTranslation()
|
||||
const user = useSelector((state: ApplicationState) => state.user)
|
||||
|
||||
return (
|
||||
|
@ -25,16 +25,12 @@ export const UserDropdown: React.FC = () => {
|
|||
<Trans i18nKey="editor.help.documents.features"/>
|
||||
</Dropdown.Item>
|
||||
</LinkContainer>
|
||||
<LinkContainer to={'/me/export'}>
|
||||
<LinkContainer to={'/profile'}>
|
||||
<Dropdown.Item>
|
||||
<FontAwesomeIcon icon="cloud-download-alt" fixedWidth={true} className="mr-2"/>
|
||||
<Trans i18nKey="profile.exportUserData"/>
|
||||
<FontAwesomeIcon icon="user" fixedWidth={true} className="mr-2"/>
|
||||
<Trans i18nKey="profile.userProfile"/>
|
||||
</Dropdown.Item>
|
||||
</LinkContainer>
|
||||
<Dropdown.Item href="#">
|
||||
<FontAwesomeIcon icon="trash" fixedWidth={true} className="mr-2"/>
|
||||
<Trans i18nKey="profile.deleteUser"/>
|
||||
</Dropdown.Item>
|
||||
<Dropdown.Item
|
||||
onClick={() => {
|
||||
clearUser()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue