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