Web: People: Removed unused method
This commit is contained in:
parent
e333e7e82d
commit
866a1bfa68
@ -127,7 +127,6 @@ class SettingsStore {
|
||||
setIsTabletView: action,
|
||||
setValue: action,
|
||||
setArticlePinned: action,
|
||||
getSerializedProfile: action,
|
||||
});
|
||||
}
|
||||
|
||||
@ -219,25 +218,6 @@ class SettingsStore {
|
||||
this.updateEncryptionKeys(encryptionKeys);
|
||||
};
|
||||
|
||||
getSerializedProfile = () => {
|
||||
return new Promise((resolve) => {
|
||||
localStorage.removeItem("profile");
|
||||
const interval = setInterval(() => {
|
||||
try {
|
||||
const profile = localStorage.getItem("profile");
|
||||
|
||||
if (profile) {
|
||||
localStorage.removeItem("profile");
|
||||
clearInterval(interval);
|
||||
resolve(profile);
|
||||
}
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
|
||||
getOAuthToken = (tokenGetterWin) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
localStorage.removeItem("code");
|
||||
|
@ -590,7 +590,7 @@ class UpdateUserForm extends React.Component {
|
||||
};
|
||||
|
||||
linkAccount = (providerName, link, e) => {
|
||||
const { getOAuthToken, getSerializedProfile } = this.props;
|
||||
const { getOAuthToken } = this.props;
|
||||
e.preventDefault();
|
||||
|
||||
try {
|
||||
@ -614,10 +614,6 @@ class UpdateUserForm extends React.Component {
|
||||
"login",
|
||||
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no"
|
||||
);
|
||||
|
||||
getSerializedProfile().then((profile) => {
|
||||
console.log(profile);
|
||||
});
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
@ -1074,7 +1070,6 @@ export default withRouter(
|
||||
updateProfileInUsers: peopleStore.usersStore.updateProfileInUsers,
|
||||
setProviders: peopleStore.usersStore.setProviders,
|
||||
providers: peopleStore.usersStore.providers,
|
||||
getSerializedProfile: auth.settingsStore.getSerializedProfile,
|
||||
updateProfile: peopleStore.targetUserStore.updateProfile,
|
||||
getUserPhoto: peopleStore.targetUserStore.getUserPhoto,
|
||||
disableProfileType: peopleStore.targetUserStore.getDisableProfileType,
|
||||
|
6
public/thirdparty/third-party.html
vendored
6
public/thirdparty/third-party.html
vendored
@ -80,11 +80,7 @@
|
||||
const code = urlParams ? urlParams.code || null : null;
|
||||
const error = urlParams ? urlParams.error || null : null;
|
||||
|
||||
if (error) {
|
||||
console.log(error);
|
||||
localStorage.setItem("third-party-error", error);
|
||||
window.close();
|
||||
} else if (code) {
|
||||
if (code) {
|
||||
localStorage.setItem("code", code);
|
||||
window.close();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user