1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00
Co-authored-by: lian <lian@seafile.com>
This commit is contained in:
lian
2020-03-19 20:15:26 +08:00
committed by GitHub
parent 8ef7d18c15
commit 2de4d4846e
33 changed files with 4756 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ import ListInAddressBook from './components/user-settings/list-in-address-book';
import EmailNotice from './components/user-settings/email-notice';
import TwoFactorAuthentication from './components/user-settings/two-factor-auth';
import SocialLogin from './components/user-settings/social-login';
import SocialLoginDingtalk from './components/user-settings/social-login-dingtalk';
import DeleteAccount from './components/user-settings/delete-account';
import './css/toolbar.css';
@@ -22,12 +23,13 @@ import './css/search.css';
import './css/user-settings.css';
const {
const {
canUpdatePassword, passwordOperationText,
enableAddressBook,
enableWebdavSecret,
twoFactorAuthEnabled,
enableWechatWork,
enableDingtalk,
enableDeleteAccount
} = window.app.pageOptions;
@@ -44,6 +46,7 @@ class Settings extends React.Component {
{show: isPro, href: '#email-notice', text: gettext('Email Notification')},
{show: twoFactorAuthEnabled, href: '#two-factor-auth', text: gettext('Two-Factor Authentication')},
{show: enableWechatWork, href: '#social-auth', text: gettext('Social Login')},
{show: enableDingtalk, href: '#social-auth', text: gettext('Social Login')},
{show: enableDeleteAccount, href: '#del-account', text: gettext('Delete Account')},
];
@@ -62,7 +65,7 @@ class Settings extends React.Component {
toaster.danger(errMessage);
});
}
updateUserInfo = (data) => {
seafileAPI.updateUserInfo(data).then((res) => {
this.setState({
@@ -127,12 +130,13 @@ class Settings extends React.Component {
</div>
}
{enableWebdavSecret && <WebdavPassword />}
{enableAddressBook && this.state.userInfo &&
{enableAddressBook && this.state.userInfo &&
<ListInAddressBook userInfo={this.state.userInfo} updateUserInfo={this.updateUserInfo} />}
<LanguageSetting />
{isPro && <EmailNotice />}
{twoFactorAuthEnabled && <TwoFactorAuthentication />}
{enableWechatWork && <SocialLogin />}
{enableDingtalk && <SocialLoginDingtalk />}
{enableDeleteAccount && <DeleteAccount />}
</div>
</div>