Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gzupanda
code-server
提交
5b64cb34
C
code-server
项目概览
gzupanda
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5b64cb34
编写于
8月 02, 2019
作者:
A
Asher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix login page
上级
712274d9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
123 addition
and
96 deletion
+123
-96
src/login/index.html
src/login/index.html
+121
-0
src/login/login.css
src/login/login.css
+0
-94
src/server.ts
src/server.ts
+2
-2
未找到文件。
src/login/
login
.html
→
src/login/
index
.html
浏览文件 @
5b64cb34
...
...
@@ -3,7 +3,102 @@
<head>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
>
<title>
Authenticate: code-server
</title>
<link
href=
"/login/login.css"
rel=
"stylesheet"
>
<style>
html
{
box-sizing
:
border-box
;
}
*,
*
:before
,
*
:after
{
box-sizing
:
inherit
;
}
html
,
body
{
background-color
:
#FFFFFF
;
height
:
100%
;
min-height
:
100%
;
}
body
{
align-items
:
center
;
display
:
flex
;
font-family
:
"monospace"
;
justify-content
:
center
;
margin
:
0
;
padding
:
10px
;
}
.login-form
{
border-radius
:
5px
;
box-shadow
:
0
18px
80px
10px
rgba
(
69
,
65
,
78
,
0.08
);
color
:
#575962
;
margin-top
:
-10%
;
max-width
:
328px
;
padding
:
40px
;
position
:
relative
;
width
:
100%
;
}
.login-form
>
.title
{
text-align
:
center
;
text-transform
:
uppercase
;
font-size
:
12px
;
font-weight
:
500
;
letter-spacing
:
1.5px
;
line-height
:
15px
;
margin-bottom
:
0px
;
margin-bottom
:
5px
;
margin-top
:
0px
;
}
.login-form
>
.subtitle
{
font-size
:
19px
;
font-weight
:
bold
;
line-height
:
25px
;
margin-bottom
:
45px
;
margin
:
0
;
text-align
:
center
;
}
.login-form
>
.field
{
text-align
:
left
;
font-size
:
12px
;
color
:
#797E84
;
margin
:
16px
0
;
}
.login-form
>
.field
>
.input
{
background
:
none
!important
;
border
:
1px
solid
#ccc
;
border-radius
:
2px
;
padding
:
5px
;
width
:
100%
;
}
.login-form
>
.button
{
border
:
none
;
border-radius
:
24px
;
box-shadow
:
0
12px
17px
2px
rgba
(
171
,
173
,
163
,
0.14
),
0
5px
22px
4px
rgba
(
171
,
173
,
163
,
0.12
),
0
7px
8px
-4px
rgba
(
171
,
173
,
163
,
0.2
);
cursor
:
pointer
;
display
:
block
;
padding
:
15px
5px
;
width
:
100%
;
}
.login-form
>
.button
:hover
{
background-color
:
rgb
(
0
,
122
,
204
);
color
:
#fff
;
}
.error-display
{
box-sizing
:
border-box
;
color
:
#bb2d0f
;
font-size
:
14px
;
font-weight
:
400
;
line-height
:
12px
;
padding
:
20px
8px
0
;
text-align
:
center
;
}
</style>
</head>
<body>
<form
class=
"login-form"
action=
"/login"
method=
"post"
>
...
...
src/login/login.css
已删除
100644 → 0
浏览文件 @
712274d9
html
{
box-sizing
:
border-box
;
}
*,
*
:before
,
*
:after
{
box-sizing
:
inherit
;
}
html
,
body
{
background-color
:
#FFFFFF
;
height
:
100%
;
min-height
:
100%
;
}
body
{
align-items
:
center
;
display
:
flex
;
font-family
:
"monospace"
;
justify-content
:
center
;
margin
:
0
;
padding
:
10px
;
}
.login-form
{
border-radius
:
5px
;
box-shadow
:
0
18px
80px
10px
rgba
(
69
,
65
,
78
,
0.08
);
color
:
#575962
;
margin-top
:
-10%
;
max-width
:
328px
;
padding
:
40px
;
position
:
relative
;
width
:
100%
;
}
.login-form
>
.title
{
text-align
:
center
;
text-transform
:
uppercase
;
font-size
:
12px
;
font-weight
:
500
;
letter-spacing
:
1.5px
;
line-height
:
15px
;
margin-bottom
:
0px
;
margin-bottom
:
5px
;
margin-top
:
0px
;
}
.login-form
>
.subtitle
{
font-size
:
19px
;
font-weight
:
bold
;
line-height
:
25px
;
margin-bottom
:
45px
;
margin
:
0
;
text-align
:
center
;
}
.login-form
>
.field
{
text-align
:
left
;
font-size
:
12px
;
color
:
#797E84
;
margin
:
16px
0
;
}
.login-form
>
.field
>
.input
{
background
:
none
!important
;
border
:
1px
solid
#ccc
;
border-radius
:
2px
;
padding
:
5px
;
width
:
100%
;
}
.login-form
>
.button
{
border
:
none
;
border-radius
:
24px
;
box-shadow
:
0
12px
17px
2px
rgba
(
171
,
173
,
163
,
0.14
),
0
5px
22px
4px
rgba
(
171
,
173
,
163
,
0.12
),
0
7px
8px
-4px
rgba
(
171
,
173
,
163
,
0.2
);
cursor
:
pointer
;
display
:
block
;
padding
:
15px
5px
;
width
:
100%
;
}
.login-form
>
.button
:hover
{
background-color
:
rgb
(
0
,
122
,
204
);
color
:
#fff
;
}
.error-display
{
box-sizing
:
border-box
;
color
:
#bb2d0f
;
font-size
:
14px
;
font-weight
:
400
;
line-height
:
12px
;
padding
:
20px
8px
0
;
text-align
:
center
;
}
src/server.ts
浏览文件 @
5b64cb34
...
...
@@ -241,7 +241,7 @@ export abstract class Server {
case
"
/login
"
:
if
(
!
this
.
options
.
auth
)
{
throw
new
HttpError
(
"
Not found
"
,
HttpCode
.
NotFound
);
}
else
if
(
requestPath
===
""
)
{
}
else
if
(
requestPath
===
"
/index.html
"
)
{
return
this
.
tryLogin
(
request
);
}
this
.
ensureGet
(
request
);
...
...
@@ -318,7 +318,7 @@ export abstract class Server {
}
private
async
getLogin
(
error
:
string
=
""
,
payload
?:
LoginPayload
):
Promise
<
Response
>
{
const
filePath
=
path
.
join
(
this
.
rootPath
,
"
out/vs/server/src/login/
login
.html
"
);
const
filePath
=
path
.
join
(
this
.
rootPath
,
"
out/vs/server/src/login/
index
.html
"
);
const
content
=
(
await
util
.
promisify
(
fs
.
readFile
)(
filePath
,
"
utf8
"
))
.
replace
(
"
{{ERROR}}
"
,
error
)
.
replace
(
"
display:none
"
,
error
?
"
display:block
"
:
"
display:none
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录