You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Show password nag bar when user is PWLU
This commit is contained in:
@ -284,6 +284,7 @@ export function setLoggedIn(credentials) {
|
||||
|
||||
// Resolves by default
|
||||
let teamPromise = Promise.resolve(null);
|
||||
let isPasswordStored = false;
|
||||
|
||||
// persist the session
|
||||
if (localStorage) {
|
||||
@ -307,6 +308,7 @@ export function setLoggedIn(credentials) {
|
||||
// is cached here such that the user can change it at a later time.
|
||||
if (credentials.password) {
|
||||
localStorage.setItem("mx_pass", credentials.password);
|
||||
isPasswordStored = true;
|
||||
}
|
||||
|
||||
console.log("Session persisted for %s", credentials.userId);
|
||||
@ -332,10 +334,10 @@ export function setLoggedIn(credentials) {
|
||||
MatrixClientPeg.replaceUsingCreds(credentials);
|
||||
|
||||
teamPromise.then((teamToken) => {
|
||||
dis.dispatch({action: 'on_logged_in', teamToken: teamToken});
|
||||
dis.dispatch({action: 'on_logged_in', teamToken: teamToken, isPasswordStored});
|
||||
}, (err) => {
|
||||
console.warn("Failed to get team token on login", err);
|
||||
dis.dispatch({action: 'on_logged_in', teamToken: null});
|
||||
dis.dispatch({action: 'on_logged_in', teamToken: null, isPasswordStored});
|
||||
});
|
||||
|
||||
startMatrixClient();
|
||||
|
Reference in New Issue
Block a user