Files
vscode/extensions/github-authentication/media/index.html
Copilot 5a501dcde9 Add light mode support to GitHub authentication sign-in page (#251509)
* Initial plan for issue

* Add light mode support to GitHub auth page using CSS media queries

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* use vscode colors

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
Co-authored-by: Tyler Leonhardt <tyleonha@microsoft.com>
2025-06-15 23:27:27 -07:00

53 lines
1.5 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>
<a class="branding app-name" href="https://code.visualstudio.com/"></a>
<div class="message-container">
<div class="message">
Sign-in successful! Returning to <span class="app-name"></span>...
<br><br>
If you're not redirected automatically, <a href="#" id="fallback-link">click here</a> or close this page.
</div>
<div class="error-message">
An error occurred while signing in:
<div class="error-text"></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-text')
.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>