mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Show properties in user page.
This commit is contained in:
@ -26,6 +26,11 @@ import * as Provider from "./auth/Provider";
|
||||
import PasswordModal from "./PasswordModal";
|
||||
import ResetModal from "./ResetModal";
|
||||
|
||||
import {Controlled as CodeMirror} from 'react-codemirror2'
|
||||
import "codemirror/lib/codemirror.css"
|
||||
require('codemirror/theme/material-darker.css');
|
||||
require("codemirror/mode/javascript/javascript");
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
class UserEditPage extends React.Component {
|
||||
@ -321,6 +326,21 @@ class UserEditPage extends React.Component {
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
!Setting.isAdminUser(this.props.account) ? null : (
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("user:Properties")}:
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<CodeMirror
|
||||
value={JSON.stringify(this.state.user.properties, null, 4)}
|
||||
options={{mode: 'javascript', theme: "material-darker"}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
)
|
||||
}
|
||||
{
|
||||
!Setting.isAdminUser(this.props.account) ? null : (
|
||||
<React.Fragment>
|
||||
|
@ -117,6 +117,7 @@
|
||||
"Modify affiliation": "Modify affiliation",
|
||||
"Tag": "Tag",
|
||||
"Third-party logins": "Third-party logins",
|
||||
"Properties": "Properties",
|
||||
"Link": "Link",
|
||||
"Unlink": "Unlink",
|
||||
"Is admin": "Is admin",
|
||||
|
@ -117,6 +117,7 @@
|
||||
"Modify affiliation": "修改工作单位",
|
||||
"Tag": "标签",
|
||||
"Third-party logins": "第三方登录",
|
||||
"Properties": "属性",
|
||||
"Link": "绑定",
|
||||
"Unlink": "解绑",
|
||||
"Is admin": "是管理员",
|
||||
|
Reference in New Issue
Block a user