Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
彭彦祖
code-server
提交
595ce6f5
C
code-server
项目概览
彭彦祖
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
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,发现更多精彩内容 >>
未验证
提交
595ce6f5
编写于
2月 26, 2020
作者:
A
Asher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update styling
Just sort of winging it.
上级
b1760c8d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
145 addition
and
170 deletion
+145
-170
src/browser/pages/error.css
src/browser/pages/error.css
+12
-4
src/browser/pages/error.html
src/browser/pages/error.html
+1
-1
src/browser/pages/global.css
src/browser/pages/global.css
+48
-2
src/browser/pages/home.css
src/browser/pages/home.css
+8
-31
src/browser/pages/home.html
src/browser/pages/home.html
+27
-19
src/browser/pages/login.css
src/browser/pages/login.css
+5
-46
src/browser/pages/login.html
src/browser/pages/login.html
+24
-21
src/browser/pages/update.css
src/browser/pages/update.css
+3
-31
src/browser/pages/update.html
src/browser/pages/update.html
+11
-6
src/node/app/app.ts
src/node/app/app.ts
+5
-5
src/node/app/update.ts
src/node/app/update.ts
+1
-4
未找到文件。
src/browser/pages/error.css
浏览文件 @
595ce6f5
.error-display
{
box-sizing
:
border-box
;
color
:
#fcfcfc
;
padding
:
20px
;
text-align
:
center
;
}
.error-display
>
.header
{
font-size
:
6rem
;
margin
:
0
;
}
.error-display
>
.body
{
color
:
#444
;
font-size
:
1.2rem
;
}
.error-display
>
.links
{
margin-top
:
1
rem
;
margin-top
:
1
6px
;
}
.error-display
>
.links
>
.link
{
color
:
#b6b6b6
;
color
:
rgb
(
87
,
114
,
245
)
;
text-decoration
:
none
;
}
.error-display
>
.links
>
.link
:hover
{
color
:
#fcfcfc
;
text-decoration
:
underline
;
}
src/browser/pages/error.html
浏览文件 @
595ce6f5
...
...
@@ -7,7 +7,7 @@
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
/>
<meta
http-equiv=
"Content-Security-Policy"
content=
"style-src 'self'; manifest-src 'self'; img-src 'self' data:;"
/>
<title>
code-server {{ERROR_TITLE}}
</title>
<title>
{{ERROR_TITLE}} - code-server
</title>
<link
rel=
"icon"
href=
"{{BASE}}/static-{{COMMIT}}/src/browser/media/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"manifest"
...
...
src/browser/pages/global.css
浏览文件 @
595ce6f5
...
...
@@ -8,22 +8,68 @@ body,
body
{
background
:
rgb
(
244
,
247
,
252
);
color
:
#
f4f4f4
;
color
:
#
111
;
margin
:
0
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
Helvetica
,
Arial
,
sans-serif
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
;
overflow
:
hidden
;
}
input
,
button
{
font-family
:
inherit
;
font-size
:
inherit
;
font-size
:
1rem
;
line-height
:
1rem
;
}
.-button
{
background-color
:
rgb
(
87
,
114
,
245
);
border-radius
:
5px
;
border
:
none
;
box-sizing
:
border-box
;
color
:
white
;
cursor
:
pointer
;
padding
:
18px
20px
;
text-decoration
:
none
;
}
.center-container
{
align-items
:
center
;
box-sizing
:
border-box
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
padding
:
20px
;
}
.card-box
{
background-color
:
rgb
(
250
,
253
,
258
);
border-radius
:
5px
;
box-shadow
:
rgba
(
60
,
66
,
87
,
0.117647
)
0px
7px
14px
0px
,
rgba
(
0
,
0
,
0
,
0.117647
)
0px
3px
6px
0px
;
max-width
:
650px
;
width
:
100%
;
}
.card-box
>
.header
{
border-bottom
:
1px
solid
#ddd
;
color
:
#444
;
padding
:
30px
;
}
.card-box
>
.header
>
.main
{
margin
:
0
;
font-size
:
1.5rem
;
}
.card-box
>
.header
>
.sub
{
color
:
#555
;
margin-top
:
10px
;
}
.card-box
>
.content
{
padding
:
40px
;
}
.card-box
+
.card-box
{
margin-top
:
26px
;
}
src/browser/pages/home.css
浏览文件 @
595ce6f5
.info-blocks
{
max-width
:
500px
;
width
:
100%
;
}
.info-block
>
.header
{
font-size
:
1.3rem
;
margin
:
1.5rem
0
;
}
.info-block
>
.none
{
color
:
#b6b6b6
;
}
.info-block
+
.info-block
{
border-top
:
1px
solid
#666
;
margin-top
:
1rem
;
}
.block-row
{
display
:
flex
;
}
.block-row
>
.item
{
color
:
#c4c4c4
;
flex
:
1
;
}
...
...
@@ -31,16 +11,17 @@
}
.block-row
>
.item
>
.sub
{
color
:
#888
;
font-size
:
0.95em
;
}
.block-row
.-link
{
cursor
:
pointer
;
color
:
rgb
(
87
,
114
,
245
);
display
:
block
;
text-decoration
:
none
;
}
.block-row
.-link
:hover
{
color
:
#fafafa
;
text-decoration
:
underline
;
}
.block-row
>
.item
>
.icon
{
...
...
@@ -51,8 +32,8 @@
}
.block-row
>
.item
>
.icon.-missing
{
background-color
:
#eee
;
color
:
#
b6b6b6
;
background-color
:
rgb
(
87
,
114
,
245
)
;
color
:
#
fff
;
text-align
:
center
;
}
...
...
@@ -67,16 +48,12 @@
}
.kill-form
>
.kill
{
background-color
:
transparent
;
background-color
:
rgb
(
87
,
114
,
245
)
;
border
:
none
;
color
:
#
b6b6b6
;
color
:
#
fff
;
cursor
:
pointer
;
font-size
:
1rem
;
line-height
:
1rem
;
margin
:
0
;
padding
:
0
;
}
.kill-form
>
.kill
:hover
{
color
:
#fafafa
;
}
src/browser/pages/home.html
浏览文件 @
595ce6f5
...
...
@@ -20,15 +20,18 @@
</head>
<body>
<div
class=
"center-container"
>
<div
class=
"info-blocks"
>
<!-- TEMP: Only VS Code for now. -->
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Running Applications</h2> -->
<!-- {{APP_LIST:RUNNING}} -->
<!-- </div> -->
<!-- TEMP: Only VS Code for now. -->
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Running Applications</h2> -->
<!-- {{APP_LIST:RUNNING}} -->
<!-- </div> -->
<div
class=
"info-block"
>
<h2
class=
"header"
>
Launch
</h2>
<div
class=
"card-box"
>
<div
class=
"header"
>
<h2
class=
"main"
>
Launch
</h2>
<div
class=
"sub"
>
Choose an application to launch below.
</div>
</div>
<div
class=
"content"
>
<div
class=
"block-row"
>
<a
class=
"item -link"
href=
"./vscode"
>
<img
class=
"icon"
src=
"./static-{{COMMIT}}/lib/vscode/resources/linux/code.png"
/>
...
...
@@ -36,22 +39,27 @@
</a>
</div>
</div>
</div>
<div
class=
"info-block"
>
<h2
class=
"header"
>
Version
</h2>
<div
class=
"card-box"
>
<div
class=
"header"
>
<h2
class=
"main"
>
Version
</h2>
<div
class=
"sub"
>
Version information and updates.
</div>
</div>
<div
class=
"content"
>
{{UPDATE:NAME}}
</div>
</div>
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Editors</h2> -->
<!-- {{APP_LIST:EDITORS}} -->
<!-- </div> -->
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Editors</h2> -->
<!-- {{APP_LIST:EDITORS}} -->
<!-- </div> -->
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Other</h2> -->
<!-- {{APP_LIST:OTHER}} -->
<!-- </div> -->
</div>
<!-- <div class="info-block"> -->
<!-- <h2 class="header">Other</h2> -->
<!-- {{APP_LIST:OTHER}} -->
<!-- </div> -->
</div>
</body>
</html>
src/browser/pages/login.css
浏览文件 @
595ce6f5
body
{
overflow
:
auto
;
}
.center-container
{
width
:
100vw
;
height
:
100vh
;
padding
:
20px
40px
;
min-height
:
400px
;
}
.login-form
{
border-radius
:
5px
;
box-shadow
:
rgba
(
60
,
66
,
87
,
0.117647
)
0px
7px
14px
0px
,
rgba
(
0
,
0
,
0
,
0.117647
)
0px
3px
6px
0px
;
color
:
rgba
(
0
,
0
,
0
,
0.37
);
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
justify-content
:
center
;
padding
:
20px
40px
;
position
:
relative
;
height
:
300px
;
min-width
:
320px
;
max-width
:
500px
;
}
.main
{
font-size
:
40px
;
}
.login-form
>
.header
{
align-items
:
center
;
color
:
black
;
}
.login-form
>
.header
>
.sub
{
margin-top
:
10px
;
}
.login-form
>
.field
{
margin-top
:
40px
;
display
:
flex
;
flex-direction
:
row
;
width
:
100%
;
height
:
50px
;
}
.login-form
>
.error
{
color
:
red
;
margin-top
:
1
rem
;
margin-top
:
1
6px
;
}
.login-form
>
.field
>
.password
{
background-color
:
rgb
(
244
,
247
,
252
);
border-radius
:
5px
;
border
:
1px
solid
#ddd
;
background
:
rgb
(
244
,
247
,
252
);
box-sizing
:
border-box
;
padding
:
1rem
;
flex
:
1
;
font-size
:
20px
;
border-radius
:
5px
;
color
:
black
;
min-width
:
100px
;
flex
:
1
;
padding
:
16px
;
}
.login-form
>
.user
{
...
...
@@ -67,14 +35,5 @@ body {
}
.login-form
>
.field
>
.submit
{
font-size
:
20px
;
border
:
none
;
box-sizing
:
border-box
;
margin-left
:
20px
;
background-color
:
rgb
(
87
,
114
,
245
);
color
:
white
;
font-family
:
monospace
;
padding
:
10px
20px
;
border-radius
:
5px
;
}
src/browser/pages/login.html
浏览文件 @
595ce6f5
...
...
@@ -22,31 +22,34 @@
</head>
<body>
<div
class=
"center-container"
>
<
form
class=
"login-form"
method=
"post
"
>
<
div
class=
"card-box
"
>
<div
class=
"header"
>
<
div
class=
"main"
>
Welcome to code-server
</div
>
<
h1
class=
"main"
>
Welcome to code-server
</h1
>
<div
class=
"sub"
>
Please log in below. Check code-server's logs for the generated password.
</div>
</div>
<input
class=
"user"
type=
"text"
autocomplete=
"username"
/>
<input
id=
"base"
type=
"hidden"
name=
"base"
value=
"/"
/>
<div
class=
"field"
>
<!-- The onfocus code places the cursor at the end of the value. -->
<input
required
autofocus
value=
"{{VALUE}}"
onfocus=
"const value=this.value;this.value='';this.value=value;"
class=
"password"
type=
"password"
placeholder=
"PASSWORD"
name=
"password"
autocomplete=
"current-password"
/>
<input
class=
"submit"
value=
"SUBMIT"
type=
"submit"
/>
<div
class=
"content"
>
<form
class=
"login-form"
method=
"post"
>
<input
class=
"user"
type=
"text"
autocomplete=
"username"
/>
<input
id=
"base"
type=
"hidden"
name=
"base"
value=
"/"
/>
<div
class=
"field"
>
<!-- The onfocus code places the cursor at the end of the value. -->
<input
required
autofocus
value=
"{{VALUE}}"
onfocus=
"const value=this.value;this.value='';this.value=value;"
class=
"password"
type=
"password"
placeholder=
"PASSWORD"
name=
"password"
autocomplete=
"current-password"
/>
<input
class=
"submit -button"
value=
"SUBMIT"
type=
"submit"
/>
</div>
{{ERROR}}
</form>
</div>
{{ERROR}}
</form>
</div>
</div>
</body>
<script>
...
...
src/browser/pages/update.css
浏览文件 @
595ce6f5
...
...
@@ -2,39 +2,11 @@
text-align
:
center
;
}
.update-form
>
.apply
{
background-color
:
transparent
;
color
:
#b6b6b6
;
cursor
:
pointer
;
border
:
1px
solid
#b6b6b6
;
box-sizing
:
border-box
;
padding
:
1rem
2rem
;
}
.update-form
>
.apply
:hover
{
color
:
#fafafa
;
border-color
:
#fafafa
;
}
.update-form
>
.current
{
margin-top
:
1rem
;
}
.update-form
>
.links
{
margin-top
:
1rem
;
}
.update-form
>
.links
>
.link
{
color
:
#b6b6b6
;
text-decoration
:
none
;
}
.update-form
>
.links
>
.link
:hover
{
color
:
#fcfcfc
;
text-decoration
:
underline
;
.update-form
>
.cancel
{
background-color
:
red
;
}
.update-form
>
.error
{
color
:
red
;
margin-top
:
1
rem
;
margin-top
:
1
6px
;
}
src/browser/pages/update.html
浏览文件 @
595ce6f5
...
...
@@ -19,13 +19,18 @@
</head>
<body>
<div
class=
"center-container"
>
<form
class=
"update-form"
method=
"post"
>
<h2
class=
"header"
>
Update
</h2>
{{UPDATE_STATUS}} {{ERROR}}
<div
class=
"links"
>
<a
class=
"link"
href=
"{{BASE}}"
>
go home
</a>
<div
class=
"card-box"
>
<div
class=
"header"
>
<h1
class=
"main"
>
Update
</h1>
<div
class=
"sub"
>
Update code-server.
</div>
</div>
</form>
<div
class=
"content"
>
<form
class=
"update-form"
method=
"post"
>
{{UPDATE_STATUS}} {{ERROR}}
<a
class=
"cancel -button"
href=
"{{BASE}}"
>
Cancel
</a>
</form>
</div>
</div>
</div>
</body>
</html>
src/node/app/app.ts
浏览文件 @
595ce6f5
...
...
@@ -166,7 +166,7 @@ export class MainHttpProvider extends HttpProvider {
if
(
this
.
update
.
isLatestVersion
(
update
))
{
return
`<div class="block-row">
<div class="item">
${
update
.
version
}
Latest:
${
update
.
version
}
<div class="sub">Up to date</div>
</div>
<div class="item">
...
...
@@ -178,13 +178,13 @@ export class MainHttpProvider extends HttpProvider {
}
return
`<div class="block-row">
<
a class="item -link" href="./update
">
${
update
.
version
}
<
div class="item
">
Latest:
${
update
.
version
}
<div class="sub">Out of date</div>
</
a
>
</
div
>
<div class="item">
${
humanize
(
update
.
checked
)}
<a class="sub -link" href="./update
/check">Check
now</a>
<a class="sub -link" href="./update
">Update
now</a>
</div>
<div class="item" >Current:
${
this
.
update
.
currentVersion
}
</div>
</div>`
...
...
src/node/app/update.ts
浏览文件 @
595ce6f5
...
...
@@ -162,10 +162,7 @@ export class UpdateHttpProvider extends HttpProvider {
throw
new
Error
(
"
No update available
"
)
}
return
`<button type="submit" class="apply">
Update to
${
update
.
version
}
</button>
<div class="current">Current:
${
this
.
currentVersion
}
</div>`
return
`<button type="submit" class="apply -button">Update to
${
update
.
version
}
</button>`
}
public
async
tryUpdate
(
route
:
Route
):
Promise
<
HttpResponse
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录