-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Feature: Implementing a back button and a logging out feature #6872
base: develop
Are you sure you want to change the base?
Conversation
…settings.ts file.
…rrent pad, also tried to make a test
Looks neat actually. I like it. |
@@ -0,0 +1,10 @@ | |||
/*.homeicon-exit:before { |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 = ".."
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