mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Updated settings.
This commit is contained in:
parent
be2fc0de8d
commit
9260e5bc33
16 changed files with 62 additions and 39 deletions
|
|
@ -1,5 +1,5 @@
|
|||
.login {
|
||||
width: 300px;
|
||||
width: 400px;
|
||||
margin: auto;
|
||||
transform: translateY(-25%);
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,15 @@ import TimezoneSetting from 'components/pages/settings/profile/TimezoneSetting';
|
|||
import DateRangeSetting from 'components/pages/settings/profile/DateRangeSetting';
|
||||
import LanguageSetting from 'components/pages/settings/profile/LanguageSetting';
|
||||
import ThemeSetting from 'components/pages/settings/profile/ThemeSetting';
|
||||
import PasswordChangeButton from './PasswordChangeButton';
|
||||
import useUser from 'hooks/useUser';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
|
||||
export default function ProfileDetails() {
|
||||
const { user } = useUser();
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { cloudMode } = useConfig();
|
||||
|
||||
if (!user) {
|
||||
return null;
|
||||
|
|
@ -22,6 +25,11 @@ export default function ProfileDetails() {
|
|||
<FormRow label={formatMessage(labels.role)}>
|
||||
{formatMessage(labels[role] || labels.unknown)}
|
||||
</FormRow>
|
||||
{!cloudMode && (
|
||||
<FormRow label={formatMessage(labels.password)}>
|
||||
<PasswordChangeButton />
|
||||
</FormRow>
|
||||
)}
|
||||
<FormRow label={formatMessage(labels.defaultDateRange)}>
|
||||
<DateRangeSetting />
|
||||
</FormRow>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
import Page from 'components/layout/Page';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import ProfileDetails from './ProfileDetails';
|
||||
import PasswordChangeButton from './PasswordChangeButton';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function ProfileSettings() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { cloudMode } = useConfig();
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<PageHeader title={formatMessage(labels.profile)}>
|
||||
{!cloudMode && <PasswordChangeButton />}
|
||||
</PageHeader>
|
||||
<PageHeader title={formatMessage(labels.profile)} />
|
||||
<ProfileDetails />
|
||||
</Page>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue