Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d27efb5c
authored
Dec 11, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化前端代码
parent
ff2b497c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
web/src/components/PersonalSetting.js
+13
-18
web/src/components/SiderBar.js
+0
-1
web/src/pages/Channel/EditChannel.js
+1
-0
No files found.
web/src/components/PersonalSetting.js
View file @
d27efb5c
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Form
,
Image
,
Message
}
from
'semantic-ui-react'
;
import
{
Link
,
useNavigate
}
from
'react-router-dom'
;
import
{
Link
,
useNavigate
}
from
'react-router-dom'
;
import
{
API
,
copy
,
isRoot
,
showError
,
showInfo
,
showNotice
,
showSuccess
}
from
'../helpers'
;
import
{
API
,
copy
,
isRoot
,
showError
,
showInfo
,
showNotice
,
showSuccess
}
from
'../helpers'
;
import
Turnstile
from
'react-turnstile'
;
import
Turnstile
from
'react-turnstile'
;
...
@@ -10,7 +9,7 @@ import {
...
@@ -10,7 +9,7 @@ import {
Button
,
Button
,
Card
,
Card
,
Descriptions
,
Descriptions
,
Divider
,
Divider
,
Image
,
Input
,
InputNumber
,
Input
,
InputNumber
,
Layout
,
Layout
,
Modal
,
Modal
,
...
@@ -267,7 +266,7 @@ const PersonalSetting = () => {
...
@@ -267,7 +266,7 @@ const PersonalSetting = () => {
}
}
return
(
return
(
<
div
style
=
{{
lineHeight
:
'40px'
}}
>
<
div
>
<
Layout
>
<
Layout
>
<
Layout
.
Content
>
<
Layout
.
Content
>
<
Modal
<
Modal
...
@@ -426,8 +425,7 @@ const PersonalSetting = () => {
...
@@ -426,8 +425,7 @@ const PersonalSetting = () => {
</Space>
</Space>
{systemToken && (
{systemToken && (
<Form.Input
<Input
fluid
readOnly
readOnly
value={systemToken}
value={systemToken}
onClick={handleSystemTokenClick}
onClick={handleSystemTokenClick}
...
@@ -451,24 +449,21 @@ const PersonalSetting = () => {
...
@@ -451,24 +449,21 @@ const PersonalSetting = () => {
visible={showWeChatBindModal}
visible={showWeChatBindModal}
size={'mini'}
size={'mini'}
>
>
<Image src={status.wechat_qrcode}
fluid
/>
<Image src={status.wechat_qrcode}/>
<div style={{textAlign: 'center'}}>
<div style={{textAlign: 'center'}}>
<p>
<p>
微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效)
微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效)
</p>
</p>
</div>
</div>
<Form size='large'>
<Input
<Form.Input
placeholder='验证码'
fluid
name='wechat_verification_code'
placeholder='验证码'
value={inputs.wechat_verification_code}
name='wechat_verification_code'
onChange={(v)=>handleInputChange('wechat_verification_code', v)}
value={inputs.wechat_verification_code}
/>
onChange={handleInputChange}
<Button color='' fluid size='large' onClick={bindWeChat}>
/>
绑定
<Button color='' fluid size='large' onClick={bindWeChat}>
</Button>
绑定
</Button>
</Form>
</Modal>
</Modal>
</div>
</div>
</Card>
</Card>
...
...
web/src/components/SiderBar.js
View file @
d27efb5c
...
@@ -2,7 +2,6 @@ import React, {useContext, useState} from 'react';
...
@@ -2,7 +2,6 @@ import React, {useContext, useState} from 'react';
import
{
Link
,
useNavigate
}
from
'react-router-dom'
;
import
{
Link
,
useNavigate
}
from
'react-router-dom'
;
import
{
UserContext
}
from
'../context/User'
;
import
{
UserContext
}
from
'../context/User'
;
import
{
Button
,
Container
,
Icon
,
Menu
,
Segment
}
from
'semantic-ui-react'
;
import
{
API
,
getLogo
,
getSystemName
,
isAdmin
,
isMobile
,
showSuccess
}
from
'../helpers'
;
import
{
API
,
getLogo
,
getSystemName
,
isAdmin
,
isMobile
,
showSuccess
}
from
'../helpers'
;
import
'../index.css'
;
import
'../index.css'
;
...
...
web/src/pages/Channel/EditChannel.js
View file @
d27efb5c
...
@@ -253,6 +253,7 @@ const EditChannel = (props) => {
...
@@ -253,6 +253,7 @@ const EditChannel = (props) => {
return
(
return
(
<>
<>
<
SideSheet
<
SideSheet
maskClosable
=
{
false
}
placement
=
{
isEdit
?
'right'
:
'left'
}
placement
=
{
isEdit
?
'right'
:
'left'
}
title
=
{
<
Title
level
=
{
3
}
>
{
isEdit
?
'更新渠道信息'
:
'创建新的渠道'
}
<
/Title>
}
title
=
{
<
Title
level
=
{
3
}
>
{
isEdit
?
'更新渠道信息'
:
'创建新的渠道'
}
<
/Title>
}
headerStyle
=
{{
borderBottom
:
'1px solid var(--semi-color-border)'
}}
headerStyle
=
{{
borderBottom
:
'1px solid var(--semi-color-border)'
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment