* feat: add dim and blur to unavailable 2fa * feat: message over disabled 2FA * feat: 2fa remove overlay and dimming * fix: add newline to _ui,css * fix: tsc errors * Update app/assets/javascripts/preferences/panes/two-factor-auth/TwoFactorAuthView.tsx Co-authored-by: Vardan Hakobyan <vardan_live@live.com> * refactor: rename s to status Co-authored-by: Vardan Hakobyan <vardan_live@live.com>
26 lines
791 B
TypeScript
26 lines
791 B
TypeScript
import { FunctionComponent } from 'preact';
|
|
import { observer } from 'mobx-react-lite';
|
|
import { WebApplication } from '@/ui_models/application';
|
|
import { PreferencesView } from './PreferencesView';
|
|
|
|
export interface PreferencesViewWrapperProps {
|
|
appState: { preferences: { isOpen: boolean; closePreferences: () => void } };
|
|
application: WebApplication;
|
|
}
|
|
|
|
export const PreferencesViewWrapper: FunctionComponent<PreferencesViewWrapperProps> =
|
|
observer(({ appState, application }) => {
|
|
if (!appState.preferences.isOpen) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<PreferencesView
|
|
closePreferences={() => appState.preferences.closePreferences()}
|
|
application={application}
|
|
mfaProvider={application}
|
|
userProvider={application}
|
|
/>
|
|
);
|
|
});
|