mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Account settings page.
This commit is contained in:
parent
58a1be7a30
commit
b5cf9f8719
32 changed files with 597 additions and 162 deletions
29
components/ProfileSettings.js
Normal file
29
components/ProfileSettings.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import React, { useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import PageHeader from './layout/PageHeader';
|
||||
import Button from './common/Button';
|
||||
import ChangePasswordForm from './forms/ChangePasswordForm';
|
||||
import Modal from './common/Modal';
|
||||
|
||||
export default function ProfileSettings() {
|
||||
const user = useSelector(state => state.user);
|
||||
const [changePassword, setChangePassword] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader>
|
||||
<div>Profile</div>
|
||||
<Button size="small" onClick={() => setChangePassword(true)}>
|
||||
Change password
|
||||
</Button>
|
||||
</PageHeader>
|
||||
<dt>Username</dt>
|
||||
<dd>{user.username}</dd>
|
||||
{changePassword && (
|
||||
<Modal title="Change password">
|
||||
<ChangePasswordForm values={user} onClose={() => setChangePassword(false)} />
|
||||
</Modal>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue