From 654cee36c317ea9bc0cef671dfb3e4b71383defd Mon Sep 17 00:00:00 2001 From: jelveh Date: Thu, 1 Oct 2026 22:21:09 -0700 Subject: [PATCH] Omit the empty email line in the toolbar account menu Temporary accounts and saved accounts without an email rendered an empty element, adding a stray gap under the username. --- src/gui/src/UI/Dashboard/AppBrowser.browser.test.js | 9 +++++++++ src/gui/src/toolbarEmbed.js | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/src/UI/Dashboard/AppBrowser.browser.test.js b/src/gui/src/UI/Dashboard/AppBrowser.browser.test.js index e2203a484..e91297b19 100644 --- a/src/gui/src/UI/Dashboard/AppBrowser.browser.test.js +++ b/src/gui/src/UI/Dashboard/AppBrowser.browser.test.js @@ -294,6 +294,15 @@ describe('embedded toolbar', () => { } finally { await context.close(); } }); + it('omits the email line for accounts without one', async () => { + const { context, toolbar } = await openToolbar(); + try { + await toolbar.getByRole('button', { name: 'Account', exact: true }).click(); + await toolbar.getByText('first@example.test').waitFor(); + expect(await toolbar.locator('[data-account="0"] small').count()).toBe(0); + } finally { await context.close(); } + }); + it('labels controls with translated text encoded once', async () => { const { context, toolbar } = await openToolbar(undefined, sessionToken, [{ name: 'user_preferences', value: '{"language":"de"}' }]); try { diff --git a/src/gui/src/toolbarEmbed.js b/src/gui/src/toolbarEmbed.js index 938efea47..07fdea135 100644 --- a/src/gui/src/toolbarEmbed.js +++ b/src/gui/src/toolbarEmbed.js @@ -75,8 +75,8 @@ function showPanel (next) { }); } else { const accounts = readSavedAccounts().filter(account => account.uuid !== user.uuid); - $content.html(`
${escape(user.username)}${escape(user.email)}
-
${accounts.map((account, index) => ``).join('')}
+ $content.html(`