Implement automatic updates
This commit is contained in:
@ -5,6 +5,7 @@ import "./error.css"
|
||||
import "./global.css"
|
||||
import "./home.css"
|
||||
import "./login.css"
|
||||
import "./update.css"
|
||||
|
||||
const options = getOptions()
|
||||
const parts = window.location.pathname.replace(/^\//g, "").split("/")
|
||||
|
@ -16,6 +16,7 @@ body {
|
||||
|
||||
button {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.center-container {
|
||||
|
@ -1,50 +1,54 @@
|
||||
.app-lists {
|
||||
max-width: 400px;
|
||||
.info-blocks {
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-list > .header {
|
||||
margin: 1rem 0;
|
||||
.info-block > .header {
|
||||
font-size: 1.3rem;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.app-list > .none {
|
||||
.info-block > .none {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
|
||||
.app-list + .app-list {
|
||||
.info-block + .info-block {
|
||||
border-top: 1px solid #666;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.app-row {
|
||||
.block-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.app-row > .open {
|
||||
.block-row > .item {
|
||||
color: #b6b6b6;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.app-row > .open:hover {
|
||||
.block-row > .item.-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.block-row > .item.-link:hover {
|
||||
color: #fafafa;
|
||||
}
|
||||
|
||||
.app-row > .open > .icon {
|
||||
.block-row > .item > .icon {
|
||||
height: 1rem;
|
||||
margin-right: 5px;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.app-row > .open > .icon.-missing {
|
||||
.block-row > .item > .icon.-missing {
|
||||
background-color: #eee;
|
||||
color: #b6b6b6;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-row > .open > .icon.-missing::after {
|
||||
.block-row > .item > .icon.-missing::after {
|
||||
content: "?";
|
||||
font-size: 0.7rem;
|
||||
vertical-align: middle;
|
||||
|
@ -13,18 +13,23 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="center-container">
|
||||
<div class="app-lists">
|
||||
<div class="app-list">
|
||||
<div class="info-blocks">
|
||||
<div class="info-block">
|
||||
<h2 class="header">Running Applications</h2>
|
||||
{{APP_LIST:RUNNING}}
|
||||
</div>
|
||||
|
||||
<div class="app-list">
|
||||
<div class="info-block">
|
||||
<h2 class="header">Update</h2>
|
||||
{{UPDATE:NAME}}
|
||||
</div>
|
||||
|
||||
<div class="info-block">
|
||||
<h2 class="header">Editors</h2>
|
||||
{{APP_LIST:EDITORS}}
|
||||
</div>
|
||||
|
||||
<div class="app-list">
|
||||
<div class="info-block">
|
||||
<h2 class="header">Other</h2>
|
||||
{{APP_LIST:OTHER}}
|
||||
</div>
|
||||
|
40
src/browser/pages/update.css
Normal file
40
src/browser/pages/update.css
Normal file
@ -0,0 +1,40 @@
|
||||
.update-form {
|
||||
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 > .error {
|
||||
color: red;
|
||||
margin-top: 1rem;
|
||||
}
|
25
src/browser/pages/update.html
Normal file
25
src/browser/pages/update.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" 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</title>
|
||||
<link rel="icon" href="{{BASE}}/static-{{COMMIT}}/src/browser/media/favicon.ico" type="image/x-icon" />
|
||||
<link rel="manifest" href="{{BASE}}/static-{{COMMIT}}/src/browser/media/manifest.json" crossorigin="use-credentials">
|
||||
<link rel="apple-touch-icon" href="{{BASE}}/static-{{COMMIT}}/src/browser/media/code-server.png" />
|
||||
<link href="{{BASE}}/static-{{COMMIT}}/dist/app.css" rel="stylesheet">
|
||||
</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>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user