Skip to content

Commit 203f6fd

Browse files
kckernclaude
andcommitted
fix(web): drop the settings Logout button left over from Google sign-in
The button called logout(), which went away with sign-in (decision #11), so clicking it threw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3144700 commit 203f6fd

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎apps/web/public/css/ui.css‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,6 @@ sup.vnum
450450
width: 250px;
451451
line-height: 20px;
452452
height: 20px;
453-
}
454-
#logout {
455-
position: absolute;
456-
top: 50px;
457-
right: 20px;
458453
}
459454
#options {
460455
width: 700px;

‎apps/web/src/presentation/ajax/settings.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export function renderSettings({ user = {}, prefs, versionsByVol }) {
3535

3636
return `<div id="settings">
3737
38-
<button onclick='logout()' id="logout">Logout</button>
3938
<h3>Scripture.Guide Preferences for ${esc(user.name)}</h3>
4039
<hr>
4140
<h5>Preferred Versions:</h5>

‎apps/web/test/unit/ajaxRoutes.test.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ describe('/settings', () => {
254254
expect($('#mail').attr('value')).toBe('');
255255
expect(repo.findPrefs).not.toHaveBeenCalled();
256256
});
257+
it('has no Logout button now that Google sign-in is gone (decision #11)', async () => {
258+
const res = await request(app).get('/settings');
259+
expect(cheerio.load(res.text)('#logout').length).toBe(0);
260+
expect(res.text).not.toContain('logout()');
261+
});
257262
it('marks saved choices for a signed-in visitor', async () => {
258263
repo.findPrefs.mockResolvedValue({ versions: { bible: { t: 'KJV' } }, options: { audio: 'false', voice: 'female', verpanel: 'ver' } });
259264
const res = await request(app).post('/settings').set('Cookie', 'sg_user=Ann; sg_mail=ann@example.com');

0 commit comments

Comments
 (0)