fix: disable change email feature
This commit is contained in:
@@ -30,7 +30,7 @@ export const AccountPreferences = observer(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<PreferencesPane>
|
<PreferencesPane>
|
||||||
<Credentials application={application} />
|
<Credentials application={application} appState={appState} />
|
||||||
<Sync application={application} />
|
<Sync application={application} />
|
||||||
{appState.enableUnfinishedFeatures && <SubscriptionWrapper application={application} />}
|
{appState.enableUnfinishedFeatures && <SubscriptionWrapper application={application} />}
|
||||||
<SignOutWrapper application={application} appState={appState} />
|
<SignOutWrapper application={application} appState={appState} />
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ import { useState } from 'preact/hooks';
|
|||||||
import { ChangeEmail } from '@/preferences/panes/account/changeEmail';
|
import { ChangeEmail } from '@/preferences/panes/account/changeEmail';
|
||||||
import { PasswordWizardType } from '@/types';
|
import { PasswordWizardType } from '@/types';
|
||||||
import { FunctionComponent } from 'preact';
|
import { FunctionComponent } from 'preact';
|
||||||
|
import { AppState } from '@/ui_models/app_state';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
application: WebApplication;
|
application: WebApplication;
|
||||||
|
appState: AppState;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Credentials: FunctionComponent<Props> = observer(({ application }: Props) => {
|
export const Credentials: FunctionComponent<Props> = observer(({ application, appState }: Props) => {
|
||||||
const [isChangeEmailDialogOpen, setIsChangeEmailDialogOpen] = useState(false);
|
const [isChangeEmailDialogOpen, setIsChangeEmailDialogOpen] = useState(false);
|
||||||
|
|
||||||
const user = application.getUser();
|
const user = application.getUser();
|
||||||
@@ -31,14 +33,16 @@ export const Credentials: FunctionComponent<Props> = observer(({ application }:
|
|||||||
<Text>
|
<Text>
|
||||||
You're signed in as <span className='font-bold'>{user?.email}</span>
|
You're signed in as <span className='font-bold'>{user?.email}</span>
|
||||||
</Text>
|
</Text>
|
||||||
<Button
|
{appState.enableUnfinishedFeatures && (
|
||||||
className='min-w-20 mt-3'
|
<Button
|
||||||
type='normal'
|
className='min-w-20 mt-3'
|
||||||
label='Change email'
|
type='normal'
|
||||||
onClick={() => {
|
label='Change email'
|
||||||
setIsChangeEmailDialogOpen(true);
|
onClick={() => {
|
||||||
}}
|
setIsChangeEmailDialogOpen(true);
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<HorizontalSeparator classes='mt-5 mb-3' />
|
<HorizontalSeparator classes='mt-5 mb-3' />
|
||||||
<div className={'text-input mt-2'}>
|
<div className={'text-input mt-2'}>
|
||||||
Password
|
Password
|
||||||
|
|||||||
Reference in New Issue
Block a user