Skip to content

Feature: Implementing a back button and a logging out feature #6872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

harshil05133
Copy link

@harshil05133 harshil05133 commented Feb 18, 2025

Created a fix/features for Issue #5633, Logout / Exit button(s). Created some tests with it as well. I am new to open source so please let me know what to do better. thank you

image

@harshil05133 harshil05133 changed the title My back branch Feature: Implementing a back button and a logging out feature Feb 18, 2025
@SamTV12345
Copy link
Member

Looks neat actually. I like it.

@@ -0,0 +1,10 @@
/*.homeicon-exit:before {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented?

@@ -387,6 +387,22 @@ exports.padeditbar = new class {
$('#myusernameedit').trigger('focus');
});

this.registerCommand('gohome', () => {
console.log('Go Home button clicked');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the comments

});

this.registerCommand('logout', () => {
console.log('Logout button clicked');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the comments

fetch('/logout', { method: 'POST' })
.then(response => {
if (response.ok) {
window.location.href = '/'; // Redirect to the home page
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better do a relative path redirect. So e.g. window.location.href = ".."

@github-actions github-actions bot added the Stale No recent activity label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants