mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-22 02:36:07 +00:00
57 lines
1.7 KiB
HTML
57 lines
1.7 KiB
HTML
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>GitHub Authentication - Sign In</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" type="text/css" media="screen" href="auth.css" />
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="content">
|
|
<div class="icon-container">
|
|
<img src="code-icon.svg" class="vscode-icon">
|
|
</div>
|
|
<h1 class="title">Launching <span class="app-name"></span></h1>
|
|
<div class="message">
|
|
<div class="success-message">
|
|
<p class="subtitle">You will be redirected in a few moments.</p>
|
|
<p class="detail">If nothing happens, <a href="#" id="fallback-link">open this link in your browser</a>.</p>
|
|
</div>
|
|
<div class="error-message">
|
|
<p class="subtitle">An error occurred while signing in:</p>
|
|
<div class="detail"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const appName = urlParams.get('app_name');
|
|
document.querySelectorAll('.app-name').forEach(e => e.innerText = appName);
|
|
|
|
const error = urlParams.get('error');
|
|
const redirectUri = urlParams.get('redirect_uri');
|
|
if (error) {
|
|
document.querySelector('.error-message > .detail').textContent = error;
|
|
document.querySelector('body').classList.add('error');
|
|
} else if (redirectUri) {
|
|
// Set up the fallback link
|
|
const fallbackLink = document.getElementById('fallback-link');
|
|
if (fallbackLink) {
|
|
fallbackLink.href = redirectUri;
|
|
}
|
|
|
|
// Redirect after a delay
|
|
setTimeout(() => {
|
|
window.location = redirectUri;
|
|
}, 1000);
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|