mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Clean up password forms.
This commit is contained in:
parent
6cf6a97b4d
commit
4451fc5982
10 changed files with 69 additions and 238 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import Page from 'components/layout/Page';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import ProfileSettings from 'components/settings/ProfileSettings';
|
||||
import ProfileDetails from 'components/settings/ProfileDetails';
|
||||
import { useState } from 'react';
|
||||
import { Breadcrumbs, Item, Tabs, useToast } from 'react-basics';
|
||||
import ProfilePasswordForm from 'components/forms/ProfilePasswordForm';
|
||||
import UserPasswordForm from 'components/forms/UserPasswordForm';
|
||||
|
||||
export default function ProfileDetails() {
|
||||
export default function ProfileSettings() {
|
||||
const [tab, setTab] = useState('general');
|
||||
const { toast, showToast } = useToast();
|
||||
|
||||
|
|
@ -25,8 +25,8 @@ export default function ProfileDetails() {
|
|||
<Item key="general">General</Item>
|
||||
<Item key="password">Password</Item>
|
||||
</Tabs>
|
||||
{tab === 'general' && <ProfileSettings />}
|
||||
{tab === 'password' && <ProfilePasswordForm onSave={handleSave} />}
|
||||
{tab === 'general' && <ProfileDetails />}
|
||||
{tab === 'password' && <UserPasswordForm onSave={handleSave} />}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ export default function UserDetails({ userId }) {
|
|||
<Item>
|
||||
<Link href="/users">Users</Link>
|
||||
</Item>
|
||||
<Item>{values?.name}</Item>
|
||||
<Item>{values?.username}</Item>
|
||||
</Breadcrumbs>
|
||||
</PageHeader>
|
||||
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30, fontSize: 14 }}>
|
||||
Loading…
Add table
Add a link
Reference in a new issue