This commit is contained in:
parent
f8d8915c60
commit
344c09c2ce
|
@ -140,7 +140,8 @@
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
if (window.opener) {
|
if (window.opener) {
|
||||||
window.opener.postMessage("signed in", "*");
|
window.opener.postMessage("signed in", "https://dev.dictionary.lingdocs.com");
|
||||||
|
window.opener.postMessage("signed in", "https://dictionary.lingdocs.com");
|
||||||
}
|
}
|
||||||
function clearPasswordForm() {
|
function clearPasswordForm() {
|
||||||
document.getElementById("oldPassword").value = "";
|
document.getElementById("oldPassword").value = "";
|
||||||
|
|
|
@ -36,10 +36,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
}, []);
|
}, []);
|
||||||
function handleIncomingMessage(event: MessageEvent<any>) {
|
function handleIncomingMessage(event: MessageEvent<any>) {
|
||||||
console.log("message incoming", event.data);
|
|
||||||
console.log("popup is", popupRef);
|
|
||||||
if (event.data === "signed in" && popupRef) {
|
if (event.data === "signed in" && popupRef) {
|
||||||
console.log("will execute");
|
|
||||||
loadUser();
|
loadUser();
|
||||||
popupRef.close();
|
popupRef.close();
|
||||||
}
|
}
|
||||||
|
@ -54,7 +51,6 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
||||||
setWaiting(true);
|
setWaiting(true);
|
||||||
upgradeAccount(upgradePassword).then((res) => {
|
upgradeAccount(upgradePassword).then((res) => {
|
||||||
setWaiting(false);
|
setWaiting(false);
|
||||||
console.log("password", upgradePassword, "response", res);
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
loadUser();
|
loadUser();
|
||||||
closeUpgrade();
|
closeUpgrade();
|
||||||
|
|
Loading…
Reference in New Issue