Skip to content
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

Added visual indication of account switching #5170

Merged
merged 10 commits into from
Jan 1, 2020
Prev Previous commit
Next Next commit
Update accountSwitcher.js
  • Loading branch information
FrankSalmick authored Nov 28, 2019
commit 68df0f8936aa3ba0f987812f1e4669989dcc930f
7 changes: 2 additions & 5 deletions lib/modules/accountSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,9 @@ const switchTo = mutex(async (username: string) => {
}

await logoutPromise;

// Provide some form of indication that the account switch is being processed
let oldCursorStyle = document.body.style.cursor;
document.body.style.cursor = "wait";

const oldCursorStyle = document.body.style.cursor;
document.body.style.cursor = 'wait';
const { success, jquery } = await ajax({
method: 'POST',
url: '/api/login',
Expand All @@ -251,7 +249,6 @@ const switchTo = mutex(async (username: string) => {
});

document.body.style.cursor = oldCursorStyle;

if (module.options.updateOtherTabs.value) {
switchedAccountElsewhere(success ? username : null);
}
Expand Down