mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Disabling unsaved changes when logging in
Summary: Disabling unsaved changes when user tries to login or singup as those endpoints tries to redirect back to the unsaved fork. Test Plan: Added new test Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D4071
This commit is contained in:
parent
988ab47376
commit
a101337213
@ -60,6 +60,7 @@ export class AccountWidget extends Disposable {
|
||||
return [
|
||||
cssSigninButton(t('Sign In'),
|
||||
cssSigninButton.cls('-secondary'),
|
||||
dom.on('click', () => { this._docPageModel?.clearUnsavedChanges(); }),
|
||||
dom.attr('href', use => {
|
||||
// Keep the redirect param of the login URL fresh.
|
||||
use(urlState().state);
|
||||
@ -68,6 +69,7 @@ export class AccountWidget extends Disposable {
|
||||
testId('user-sign-in'),
|
||||
),
|
||||
cssSigninButton(t('Sign Up'),
|
||||
dom.on('click', () => { this._docPageModel?.clearUnsavedChanges(); }),
|
||||
dom.attr('href', use => {
|
||||
// Keep the redirect param of the signup URL fresh.
|
||||
use(urlState().state);
|
||||
|
Loading…
Reference in New Issue
Block a user