|
@@ -1,6 +1,5 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
import ReactDOM from 'react-dom';
|
|
import ReactDOM from 'react-dom';
|
|
|
-import { Provider } from 'unstated';
|
|
|
|
|
import { I18nextProvider } from 'react-i18next';
|
|
import { I18nextProvider } from 'react-i18next';
|
|
|
|
|
|
|
|
import i18nFactory from './util/i18n';
|
|
import i18nFactory from './util/i18n';
|
|
@@ -8,11 +7,6 @@ import i18nFactory from './util/i18n';
|
|
|
import InstallerForm from './components/InstallerForm';
|
|
import InstallerForm from './components/InstallerForm';
|
|
|
import LoginForm from './components/LoginForm';
|
|
import LoginForm from './components/LoginForm';
|
|
|
|
|
|
|
|
-import AppContainer from './services/AppContainer';
|
|
|
|
|
-import LoginContainer from './services/LoginContainer';
|
|
|
|
|
-
|
|
|
|
|
-const appContainer = new AppContainer();
|
|
|
|
|
-
|
|
|
|
|
const i18n = i18nFactory();
|
|
const i18n = i18nFactory();
|
|
|
|
|
|
|
|
// render InstallerForm
|
|
// render InstallerForm
|
|
@@ -33,8 +27,6 @@ if (installerFormElem) {
|
|
|
// render loginForm
|
|
// render loginForm
|
|
|
const loginFormElem = document.getElementById('login-form');
|
|
const loginFormElem = document.getElementById('login-form');
|
|
|
if (loginFormElem) {
|
|
if (loginFormElem) {
|
|
|
- const loginContainer = new LoginContainer(appContainer);
|
|
|
|
|
-
|
|
|
|
|
const isRegistering = loginFormElem.dataset.isRegistering === 'true';
|
|
const isRegistering = loginFormElem.dataset.isRegistering === 'true';
|
|
|
const username = loginFormElem.dataset.username;
|
|
const username = loginFormElem.dataset.username;
|
|
|
const name = loginFormElem.dataset.name;
|
|
const name = loginFormElem.dataset.name;
|
|
@@ -58,21 +50,19 @@ if (loginFormElem) {
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
ReactDOM.render(
|
|
|
<I18nextProvider i18n={i18n}>
|
|
<I18nextProvider i18n={i18n}>
|
|
|
- <Provider inject={[loginContainer]}>
|
|
|
|
|
- <LoginForm
|
|
|
|
|
- isRegistering={isRegistering}
|
|
|
|
|
- username={username}
|
|
|
|
|
- name={name}
|
|
|
|
|
- email={email}
|
|
|
|
|
- csrf={csrf}
|
|
|
|
|
- isRegistrationEnabled={isRegistrationEnabled}
|
|
|
|
|
- registrationMode={registrationMode}
|
|
|
|
|
- registrationWhiteList={registrationWhiteList}
|
|
|
|
|
- isLocalStrategySetup={isLocalStrategySetup}
|
|
|
|
|
- isLdapStrategySetup={isLdapStrategySetup}
|
|
|
|
|
- objOfIsExternalAuthEnableds={objOfIsExternalAuthEnableds}
|
|
|
|
|
- />
|
|
|
|
|
- </Provider>
|
|
|
|
|
|
|
+ <LoginForm
|
|
|
|
|
+ isRegistering={isRegistering}
|
|
|
|
|
+ username={username}
|
|
|
|
|
+ name={name}
|
|
|
|
|
+ email={email}
|
|
|
|
|
+ csrf={csrf}
|
|
|
|
|
+ isRegistrationEnabled={isRegistrationEnabled}
|
|
|
|
|
+ registrationMode={registrationMode}
|
|
|
|
|
+ registrationWhiteList={registrationWhiteList}
|
|
|
|
|
+ isLocalStrategySetup={isLocalStrategySetup}
|
|
|
|
|
+ isLdapStrategySetup={isLdapStrategySetup}
|
|
|
|
|
+ objOfIsExternalAuthEnableds={objOfIsExternalAuthEnableds}
|
|
|
|
|
+ />
|
|
|
</I18nextProvider>,
|
|
</I18nextProvider>,
|
|
|
loginFormElem,
|
|
loginFormElem,
|
|
|
);
|
|
);
|