fix: Move content into to frontend directory

Doing this BEFORE the merge prevents a lot of merge conflicts.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-11-11 11:16:18 +01:00
parent 4e18ce38f3
commit 762a0a850e
No known key found for this signature in database
GPG key ID: B97799103358209B
1051 changed files with 0 additions and 35 deletions

View file

@ -1,48 +0,0 @@
/*
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { Col, Row } from 'react-bootstrap'
import { useApplicationState } from '../hooks/common/use-application-state'
import { ShowIf } from '../components/common/show-if/show-if'
import { ProfileAccessTokens } from '../components/profile-page/access-tokens/profile-access-tokens'
import { ProfileAccountManagement } from '../components/profile-page/account-management/profile-account-management'
import { ProfileChangePassword } from '../components/profile-page/settings/profile-change-password'
import { ProfileDisplayName } from '../components/profile-page/settings/profile-display-name'
import { LandingLayout } from '../components/landing-layout/landing-layout'
import { Redirect } from '../components/common/redirect'
import { AuthProviderType } from '../api/config/types'
/**
* Profile page that includes forms for changing display name, password (if internal login is used),
* managing access tokens and deleting the account.
*/
export const ProfilePage: React.FC = () => {
const userProvider = useApplicationState((state) => state.user?.authProvider)
if (!userProvider) {
return <Redirect to={'/login'} />
}
return (
<LandingLayout>
<div className='my-3'>
<Row className='h-100 flex justify-content-center'>
<Col lg={6}>
<ProfileDisplayName />
<ShowIf condition={userProvider === AuthProviderType.LOCAL}>
<ProfileChangePassword />
</ShowIf>
<ProfileAccessTokens />
<ProfileAccountManagement />
</Col>
</Row>
</div>
</LandingLayout>
)
}
export default ProfilePage