mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
* feat: add i18n in login page * fix: add word space and put the app name into the title * fix: remove duplicate replace title * fix: prettier format code * fix: fix typescript check warning * fix: add zh-cn locale file code owner * fix: use existing flag locale to the login page Co-authored-by: Joe Previte <jjprevite@gmail.com>
62 lines
2.5 KiB
HTML
62 lines
2.5 KiB
HTML
<!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'; script-src 'self' 'unsafe-inline'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
|
|
/>
|
|
<title>{{I18N_LOGIN_TITLE}}</title>
|
|
<link rel="icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon-dark-support.svg" />
|
|
<link rel="alternate icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon.ico" />
|
|
<link rel="manifest" href="{{BASE}}/manifest.json" crossorigin="use-credentials" />
|
|
<link rel="apple-touch-icon" sizes="192x192" href="{{CS_STATIC_BASE}}/src/browser/media/pwa-icon-192.png" />
|
|
<link rel="apple-touch-icon" sizes="512x512" href="{{CS_STATIC_BASE}}/src/browser/media/pwa-icon-512.png" />
|
|
<link href="{{CS_STATIC_BASE}}/src/browser/pages/global.css" rel="stylesheet" />
|
|
<link href="{{CS_STATIC_BASE}}/src/browser/pages/login.css" rel="stylesheet" />
|
|
<meta id="coder-options" data-settings="{{OPTIONS}}" />
|
|
</head>
|
|
<body>
|
|
<div class="center-container">
|
|
<div class="card-box">
|
|
<div class="header">
|
|
<h1 class="main">{{WELCOME_TEXT}}</h1>
|
|
<div class="sub">{{I18N_LOGIN_BELOW}} {{PASSWORD_MSG}}</div>
|
|
</div>
|
|
<div class="content">
|
|
<form class="login-form" method="post">
|
|
<input class="user" type="text" autocomplete="username" />
|
|
<input id="base" type="hidden" name="base" value="{{BASE}}" />
|
|
<input id="href" type="hidden" name="href" value="" />
|
|
<div class="field">
|
|
<input
|
|
required
|
|
autofocus
|
|
class="password"
|
|
type="password"
|
|
placeholder="{{I18N_PASSWORD_PLACEHOLDER}}"
|
|
name="password"
|
|
autocomplete="current-password"
|
|
/>
|
|
<input class="submit -button" value="{{I18N_SUBMIT}}" type="submit" />
|
|
</div>
|
|
{{ERROR}}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
// Inform the backend about the path since the proxy might have rewritten
|
|
// it out of the headers and cookies must be set with absolute paths.
|
|
const el = document.getElementById("href")
|
|
if (el) {
|
|
el.value = location.href
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|