mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-21 09:46:37 +08:00
rollback EditUser.js
This commit is contained in:
parent
fd57a1df08
commit
65694d26aa
@ -1,12 +1,10 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Button, Form, Header, Segment } from 'semantic-ui-react';
|
import { Button, Form, Header, Segment } from 'semantic-ui-react';
|
||||||
import { useParams, useNavigate } from 'react-router-dom';
|
import { useParams, useNavigate } from 'react-router-dom';
|
||||||
import {API, isMobile, showError, showSuccess} from '../../helpers';
|
import { API, showError, showSuccess } from '../../helpers';
|
||||||
import { renderQuota, renderQuotaWithPrompt } from '../../helpers/render';
|
import { renderQuota, renderQuotaWithPrompt } from '../../helpers/render';
|
||||||
import Title from "@douyinfe/semi-ui/lib/es/typography/title";
|
|
||||||
import {SideSheet, Space} from "@douyinfe/semi-ui";
|
|
||||||
|
|
||||||
const EditUser = (props) => {
|
const EditUser = () => {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const userId = params.id;
|
const userId = params.id;
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
@ -86,24 +84,8 @@ const EditUser = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SideSheet
|
<Segment loading={loading}>
|
||||||
placement={'left'}
|
<Header as='h3'>更新用户信息</Header>
|
||||||
title={<Title level={3}>更新用户信息</Title>}
|
|
||||||
headerStyle={{borderBottom: '1px solid var(--semi-color-border)'}}
|
|
||||||
bodyStyle={{borderBottom: '1px solid var(--semi-color-border)'}}
|
|
||||||
visible={props.visiable}
|
|
||||||
footer={
|
|
||||||
<div style={{display: 'flex', justifyContent: 'flex-end'}}>
|
|
||||||
<Space>
|
|
||||||
<Button theme='solid' size={'large'} onClick={submit}>提交</Button>
|
|
||||||
<Button theme='solid' size={'large'} type={'tertiary'} onClick={handleCancel}>取消</Button>
|
|
||||||
</Space>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
closeIcon={null}
|
|
||||||
onCancel={() => handleCancel()}
|
|
||||||
width={isMobile() ? '100%' : 600}
|
|
||||||
>
|
|
||||||
<Form autoComplete='new-password'>
|
<Form autoComplete='new-password'>
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
@ -200,8 +182,7 @@ const EditUser = (props) => {
|
|||||||
<Button onClick={handleCancel}>取消</Button>
|
<Button onClick={handleCancel}>取消</Button>
|
||||||
<Button positive onClick={submit}>提交</Button>
|
<Button positive onClick={submit}>提交</Button>
|
||||||
</Form>
|
</Form>
|
||||||
|
</Segment>
|
||||||
</SideSheet>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user