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
4080f2ed
authored
Jun 01, 2025
by
Apple\Apple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
♻
️ refactor: Refactor the structure of the common component
parent
309f3b9f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
8 additions
and
57 deletions
+8
-57
web/src/components/LoginForm.js
+3
-3
web/src/components/RegisterForm.js
+3
-3
web/src/components/common/logo/LinuxDoIcon.js
+0
-0
web/src/components/common/logo/OIDCIcon.js
+0
-0
web/src/components/common/logo/WeChatIcon.js
+0
-0
web/src/components/common/markdown/MarkdownRenderer.js
+1
-1
web/src/components/common/markdown/markdown.css
+0
-0
web/src/components/custom/TextInput.js
+0
-28
web/src/components/custom/TextNumberInput.js
+0
-21
web/src/components/playground/MessageContent.js
+1
-1
No files found.
web/src/components/LoginForm.js
View file @
4080f2ed
...
...
@@ -29,10 +29,10 @@ import Text from '@douyinfe/semi-ui/lib/es/typography/text';
import
TelegramLoginButton
from
'react-telegram-login'
;
import
{
IconGithubLogo
,
IconMail
,
IconLock
}
from
'@douyinfe/semi-icons'
;
import
OIDCIcon
from
'./OIDCIcon.js'
;
import
WeChatIcon
from
'./
WeChatIcon
'
;
import
OIDCIcon
from
'./
common/logo/
OIDCIcon.js'
;
import
WeChatIcon
from
'./
common/logo/WeChatIcon.js
'
;
import
{
setUserData
}
from
'../helpers/data.js'
;
import
LinuxDoIcon
from
'./LinuxDoIcon.js'
;
import
LinuxDoIcon
from
'./
common/logo/
LinuxDoIcon.js'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
Background
from
'../images/example.png'
;
...
...
web/src/components/RegisterForm.js
View file @
4080f2ed
...
...
@@ -26,9 +26,9 @@ import {
onLinuxDOOAuthClicked
,
onOIDCClicked
,
}
from
'./utils.js'
;
import
OIDCIcon
from
'./OIDCIcon.js'
;
import
LinuxDoIcon
from
'./LinuxDoIcon.js'
;
import
WeChatIcon
from
'./WeChatIcon.js'
;
import
OIDCIcon
from
'./
common/logo/
OIDCIcon.js'
;
import
LinuxDoIcon
from
'./
common/logo/
LinuxDoIcon.js'
;
import
WeChatIcon
from
'./
common/logo/
WeChatIcon.js'
;
import
TelegramLoginButton
from
'react-telegram-login/src'
;
import
{
setUserData
}
from
'../helpers/data.js'
;
import
{
UserContext
}
from
'../context/User/index.js'
;
...
...
web/src/components/LinuxDoIcon.js
→
web/src/components/
common/logo/
LinuxDoIcon.js
View file @
4080f2ed
File moved
web/src/components/OIDCIcon.js
→
web/src/components/
common/logo/
OIDCIcon.js
View file @
4080f2ed
File moved
web/src/components/WeChatIcon.js
→
web/src/components/
common/logo/
WeChatIcon.js
View file @
4080f2ed
File moved
web/src/components/common/MarkdownRenderer.js
→
web/src/components/common/
markdown/
MarkdownRenderer.js
View file @
4080f2ed
...
...
@@ -13,7 +13,7 @@ import React from 'react';
import
{
useDebouncedCallback
}
from
'use-debounce'
;
import
clsx
from
'clsx'
;
import
{
Button
,
Tooltip
,
Toast
}
from
'@douyinfe/semi-ui'
;
import
{
copy
}
from
'../../helpers/utils'
;
import
{
copy
}
from
'../../
../
helpers/utils'
;
import
{
IconCopy
}
from
'@douyinfe/semi-icons'
;
import
{
useTranslation
}
from
'react-i18next'
;
...
...
web/src/components/common/markdown.css
→
web/src/components/common/markdown
/markdown
.css
View file @
4080f2ed
File moved
web/src/components/custom/TextInput.js
deleted
100644 → 0
View file @
309f3b9f
import
{
Input
,
Typography
}
from
'@douyinfe/semi-ui'
;
import
React
from
'react'
;
const
TextInput
=
({
label
,
name
,
value
,
onChange
,
placeholder
,
type
=
'text'
,
})
=>
{
return
(
<>
<
div
style
=
{{
marginTop
:
10
}}
>
<
Typography
.
Text
strong
>
{
label
}
<
/Typography.Text
>
<
/div
>
<
Input
name
=
{
name
}
placeholder
=
{
placeholder
}
onChange
=
{(
value
)
=>
onChange
(
value
)}
value
=
{
value
}
autoComplete
=
'new-password'
/>
<
/
>
);
};
export
default
TextInput
;
web/src/components/custom/TextNumberInput.js
deleted
100644 → 0
View file @
309f3b9f
import
{
Input
,
InputNumber
,
Typography
}
from
'@douyinfe/semi-ui'
;
import
React
from
'react'
;
const
TextNumberInput
=
({
label
,
name
,
value
,
onChange
,
placeholder
})
=>
{
return
(
<>
<
div
style
=
{{
marginTop
:
10
}}
>
<
Typography
.
Text
strong
>
{
label
}
<
/Typography.Text
>
<
/div
>
<
InputNumber
name
=
{
name
}
placeholder
=
{
placeholder
}
onChange
=
{(
value
)
=>
onChange
(
value
)}
value
=
{
value
}
autoComplete
=
'new-password'
/>
<
/
>
);
};
export
default
TextNumberInput
;
web/src/components/playground/MessageContent.js
View file @
4080f2ed
...
...
@@ -4,7 +4,7 @@ import {
TextArea
,
Button
,
}
from
'@douyinfe/semi-ui'
;
import
MarkdownRenderer
from
'../common/MarkdownRenderer'
;
import
MarkdownRenderer
from
'../common/
markdown/
MarkdownRenderer'
;
import
{
ChevronRight
,
ChevronUp
,
...
...
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