diff --git a/client/index.html b/client/index.html
index 821d31a..fbe3787 100644
--- a/client/index.html
+++ b/client/index.html
@@ -39,7 +39,6 @@
-
Logged In
diff --git a/client/public/version.js b/client/public/version.js
index 2b1b283..60aece8 100644
--- a/client/public/version.js
+++ b/client/public/version.js
@@ -1,5 +1,5 @@
// Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
-window.CHGRID_WEB_VERSION = "2026.02.25 R251";
+window.CHGRID_WEB_VERSION = "2026.02.25 R252";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";
diff --git a/client/src/main.ts b/client/src/main.ts
index 327e88c..f642853 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -103,7 +103,6 @@ type Dom = {
authSessionView: HTMLElement;
authSessionText: HTMLParagraphElement;
showRegisterButton: HTMLButtonElement;
- showLoginButton: HTMLButtonElement;
updatesSection: HTMLElement;
updatesToggle: HTMLButtonElement;
updatesPanel: HTMLDivElement;
@@ -138,7 +137,6 @@ const dom: Dom = {
authSessionView: requiredById('authSessionView'),
authSessionText: requiredById('authSessionText'),
showRegisterButton: requiredById('showRegisterButton'),
- showLoginButton: requiredById('showLoginButton'),
updatesSection: requiredById('updatesSection'),
updatesToggle: requiredById('updatesToggle'),
updatesPanel: requiredById('updatesPanel'),
@@ -598,13 +596,12 @@ function updateConnectAvailability(): void {
const label = sanitizeAuthUsername(authUsername) || 'current account';
dom.authSessionText.textContent = `Logged in as ${label}.`;
dom.showRegisterButton.classList.add('hidden');
- dom.showLoginButton.classList.add('hidden');
dom.loginView.classList.add('hidden');
dom.registerView.classList.add('hidden');
dom.authSessionView.classList.remove('hidden');
} else {
dom.showRegisterButton.classList.remove('hidden');
- dom.showLoginButton.classList.remove('hidden');
+ dom.showRegisterButton.textContent = authMode === 'login' ? 'Register' : 'Login';
dom.loginView.classList.toggle('hidden', authMode !== 'login');
dom.registerView.classList.toggle('hidden', authMode !== 'register');
dom.authSessionView.classList.add('hidden');
@@ -2634,12 +2631,13 @@ function setupUiHandlers(): void {
setOutputDevice: (id) => peerManager.setOutputDevice(id),
});
dom.showRegisterButton.addEventListener('click', () => {
- setAuthMode('register');
- dom.registerUsername.focus();
- });
- dom.showLoginButton.addEventListener('click', () => {
- setAuthMode('login');
- dom.authUsername.focus();
+ if (authMode === 'login') {
+ setAuthMode('register');
+ dom.registerUsername.focus();
+ } else {
+ setAuthMode('login');
+ dom.authUsername.focus();
+ }
});
dom.logoutButton.addEventListener('click', () => {
logOutAccount();