Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chatGLM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘坚-丰林-DEV
chatGLM
Commits
4ce8dd4a
Commit
4ce8dd4a
authored
Apr 14, 2023
by
littleforest
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.baibaomen.com/jian.liu/chatgml
parents
e1bc8ac6
5be434b3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
3 deletions
+160
-3
package.json
package.json
+3
-3
logo.svg
src/assets/logo.svg
+1
-0
index.less
src/components/loginModal/index.less
+75
-0
index.tsx
src/components/loginModal/index.tsx
+81
-0
api.ts
src/services/chatGLM/api.ts
+0
-0
No files found.
package.json
View file @
4ce8dd4a
...
...
@@ -23,8 +23,8 @@
"prepare"
:
"husky install"
,
"prettier"
:
"prettier -c --write
\"
src/**/*
\"
"
,
"serve"
:
"umi-serve"
,
"start"
:
"
SET NODE_OPTIONS=--openssl-legacy-provider &&
cross-env UMI_ENV=dev umi dev"
,
"start:dev"
:
"
SET NODE_OPTIONS=--openssl-legacy-provider &&
cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev"
,
"start"
:
"cross-env UMI_ENV=dev umi dev"
,
"start:dev"
:
"cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev"
,
"start:no-mock"
:
"cross-env MOCK=none UMI_ENV=dev umi dev"
,
"start:no-ui"
:
"cross-env UMI_UI=none UMI_ENV=dev umi dev"
,
"start:pre"
:
"cross-env REACT_APP_ENV=pre UMI_ENV=dev umi dev"
,
...
...
@@ -100,4 +100,4 @@
"engines"
:
{
"node"
:
">=12.0.0"
}
}
\ No newline at end of file
}
src/assets/logo.svg
0 → 100644
View file @
4ce8dd4a
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
version=
"1.1"
viewBox=
"0 0 200 200"
><title>
Group 28 Copy 5
</title><desc>
Created with Sketch.
</desc><defs><linearGradient
id=
"linearGradient-1"
x1=
"62.102%"
x2=
"108.197%"
y1=
"0%"
y2=
"37.864%"
><stop
offset=
"0%"
stop-color=
"#4285EB"
/><stop
offset=
"100%"
stop-color=
"#2EC7FF"
/></linearGradient><linearGradient
id=
"linearGradient-2"
x1=
"69.644%"
x2=
"54.043%"
y1=
"0%"
y2=
"108.457%"
><stop
offset=
"0%"
stop-color=
"#29CDFF"
/><stop
offset=
"37.86%"
stop-color=
"#148EFF"
/><stop
offset=
"100%"
stop-color=
"#0A60FF"
/></linearGradient><linearGradient
id=
"linearGradient-3"
x1=
"69.691%"
x2=
"16.723%"
y1=
"-12.974%"
y2=
"117.391%"
><stop
offset=
"0%"
stop-color=
"#FA816E"
/><stop
offset=
"41.473%"
stop-color=
"#F74A5C"
/><stop
offset=
"100%"
stop-color=
"#F51D2C"
/></linearGradient><linearGradient
id=
"linearGradient-4"
x1=
"68.128%"
x2=
"30.44%"
y1=
"-35.691%"
y2=
"114.943%"
><stop
offset=
"0%"
stop-color=
"#FA8E7D"
/><stop
offset=
"51.264%"
stop-color=
"#F74A5C"
/><stop
offset=
"100%"
stop-color=
"#F51D2C"
/></linearGradient></defs><g
id=
"Page-1"
fill=
"none"
fill-rule=
"evenodd"
stroke=
"none"
stroke-width=
"1"
><g
id=
"logo"
transform=
"translate(-20.000000, -20.000000)"
><g
id=
"Group-28-Copy-5"
transform=
"translate(20.000000, 20.000000)"
><g
id=
"Group-27-Copy-3"
><g
id=
"Group-25"
fill-rule=
"nonzero"
><g
id=
"2"
><path
id=
"Shape"
fill=
"url(#linearGradient-1)"
d=
"M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C99.2571609,26.9692191 101.032305,26.9692191 102.20193,28.1378823 L129.985225,55.8983314 C134.193707,60.1033528 141.017005,60.1033528 145.225487,55.8983314 C149.433969,51.69331 149.433969,44.8756232 145.225487,40.6706018 L108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"
/><path
id=
"Shape"
fill=
"url(#linearGradient-2)"
d=
"M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C100.999864,25.6271836 105.751642,20.541824 112.729652,19.3524487 C117.915585,18.4685261 123.585219,20.4140239 129.738554,25.1889424 C125.624663,21.0784292 118.571995,14.0340304 108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"
/></g><path
id=
"Shape"
fill=
"url(#linearGradient-3)"
d=
"M153.685633,135.854579 C157.894115,140.0596 164.717412,140.0596 168.925894,135.854579 L195.959977,108.842726 C200.659183,104.147384 200.659183,96.5636133 195.960527,91.8688194 L168.690777,64.7181159 C164.472332,60.5180858 157.646868,60.5241425 153.435895,64.7316526 C149.227413,68.936674 149.227413,75.7543607 153.435895,79.9593821 L171.854035,98.3623765 C173.02366,99.5310396 173.02366,101.304724 171.854035,102.473387 L153.685633,120.626849 C149.47715,124.83187 149.47715,131.649557 153.685633,135.854579 Z"
/></g><ellipse
id=
"Combined-Shape"
cx=
"100.519"
cy=
"100.437"
fill=
"url(#linearGradient-4)"
rx=
"23.6"
ry=
"23.581"
/></g></g></g></g></svg>
\ No newline at end of file
src/components/loginModal/index.less
0 → 100644
View file @
4ce8dd4a
@import (reference) '~antd/es/style/themes/index';
.modal {
.ant-modal-content {
border-radius: 10px;
}
}
.modal_login {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.modal_title {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
margin-bottom: 32px;
img {
width: 60px;
height: 60px;
}
p {
height: 28px;
padding-top: 16px;
color: #333;
font-weight: 600;
font-size: 20px;
}
}
.modal_tip {
height: 24px;
color: #009b95;
font-size: 16px;
}
:global(.ant-form) {
width: 100%;
.div:nth-child(3) {
margin-bottom: 16px;
}
}
:global(.ant-input-affix-wrapper) {
height: 40px;
margin-right: 5px;
border: 1px solid #d9d9d9;
span > span > svg {
color: #009b95;
}
}
:global(.ant-checkbox-wrapper) {
span:nth-child(2) {
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
line-height: 22px;
}
}
:global(.ant-checkbox-inner) {
background-color: #009b95;
}
.modal_button {
width: 100%;
height: 44px;
background: #009b95;
border-radius: 2px;
}
}
src/components/loginModal/index.tsx
0 → 100644
View file @
4ce8dd4a
import
styles
from
'./index.less'
;
import
{
Button
,
Checkbox
,
Form
,
FormInstance
,
Input
,
Modal
}
from
'antd'
;
import
{
LockOutlined
,
UserOutlined
}
from
'@ant-design/icons'
;
import
logoSvg
from
'../../assets/logo.svg'
;
import
{
useRef
}
from
'react'
;
interface
ILoginModalProps
{
open
:
boolean
;
setOpen
:
(
value
:
boolean
)
=>
void
;
}
const
LoginModal
=
(
props
:
ILoginModalProps
)
=>
{
const
{
open
,
setOpen
}
=
props
;
const
formRef
=
useRef
<
FormInstance
>
(
null
);
const
reset
=
()
=>
{
setOpen
(
false
);
formRef
.
current
?.
resetFields
();
};
const
handleLogin
=
(
values
:
any
)
=>
{
console
.
log
(
'values'
,
values
);
reset
();
};
return
(
<
Modal
open=
{
open
}
onOk=
{
handleLogin
}
footer=
{
null
}
closable=
{
false
}
width=
{
480
}
bodyStyle=
{
{
padding
:
'56px'
,
height
:
'496px'
,
}
}
>
<
div
className=
{
styles
.
modal_login
}
>
<
div
className=
{
styles
.
modal_title
}
>
<
img
src=
{
logoSvg
}
alt=
""
/>
<
p
>
欢迎来到 CHATGLM
</
p
>
</
div
>
<
p
className=
{
styles
.
modal_tip
}
>
账户密码登录
</
p
>
<
Form
name=
"normal_login"
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
handleLogin
}
onValuesChange=
{
(
value
)
=>
{
console
.
log
(
value
);
}
}
className=
{
styles
.
modal_form
}
ref=
{
formRef
}
>
<
Form
.
Item
name=
"username"
rules=
{
[{
required
:
true
,
message
:
'Please input your Username!'
}]
}
>
<
Input
prefix=
{
<
UserOutlined
/>
}
placeholder=
"账户"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"password"
rules=
{
[{
required
:
true
,
message
:
'Please input your Password!'
}]
}
>
<
Input
prefix=
{
<
LockOutlined
/>
}
type=
"password"
placeholder=
"密码"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"remember"
valuePropName=
"checked"
className=
{
styles
.
modal_checked
}
>
<
Checkbox
>
自动登录
</
Checkbox
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
className=
{
styles
.
modal_button
}
>
登录
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
</
Modal
>
);
};
export
default
LoginModal
;
src/services/chatGLM/api.ts
0 → 100644
View file @
4ce8dd4a
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