phanterpwa 14.1.2__py3-none-any.whl → 14.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phanterpwa/__init__.py +1 -1
- phanterpwa/backend/request_handlers/oauth.py +4 -4
- phanterpwa/frontend/application.py +21 -4
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/METADATA +1 -1
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/RECORD +10 -10
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/LICENSE +0 -0
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/WHEEL +0 -0
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/entry_points.txt +0 -0
- {phanterpwa-14.1.2.dist-info → phanterpwa-14.1.3.dist-info}/top_level.txt +0 -0
phanterpwa/__init__.py
CHANGED
@@ -431,7 +431,7 @@ class Redirect(web.RequestHandler):
|
|
431
431
|
self.DALDatabase.commit()
|
432
432
|
self.set_status(200)
|
433
433
|
return self.write(
|
434
|
-
str(HTML(HEAD(), BODY(SCRIPT("window.location = '{0}'".format(redirect))))))
|
434
|
+
str(HTML(HEAD(), BODY(SCRIPT("setTimeout(function(){window.location = '{0}';}, 10)".format(redirect))))))
|
435
435
|
else:
|
436
436
|
self.logger_api.warning(
|
437
437
|
'CREATING ACCOUNT AND LOGIN BY OAUTH METHOD\n\tsocial_login: {0}\n\tname: {1}\n\temail: {2}\n\temail_verified: {3}\n\tlocale: {4}'.format(
|
@@ -552,7 +552,7 @@ class Redirect(web.RequestHandler):
|
|
552
552
|
}))
|
553
553
|
self.DALDatabase.commit()
|
554
554
|
return self.write(
|
555
|
-
str(HTML(HEAD(), BODY(SCRIPT("window.location = '{0}'".format(redirect))))))
|
555
|
+
str(HTML(HEAD(), BODY(SCRIPT("setTimeout(function(){window.location = '{0}';}, 10)".format(redirect))))))
|
556
556
|
elif social_name == "facebook":
|
557
557
|
state = dict_arguments.get("state")
|
558
558
|
q_state = self.DALDatabase(
|
@@ -709,7 +709,7 @@ class Redirect(web.RequestHandler):
|
|
709
709
|
self.DALDatabase.commit()
|
710
710
|
self.set_status(200)
|
711
711
|
return self.write(
|
712
|
-
str(HTML(HEAD(), BODY(SCRIPT("window.location = '{0}'".format(redirect))))))
|
712
|
+
str(HTML(HEAD(), BODY(SCRIPT("setTimeout(function(){window.location = '{0}';}, 10)".format(redirect))))))
|
713
713
|
else:
|
714
714
|
new_password = os.urandom(3).hex()
|
715
715
|
password_hash = pbkdf2_sha512.hash("password{0}{1}".format(
|
@@ -819,7 +819,7 @@ class Redirect(web.RequestHandler):
|
|
819
819
|
}))
|
820
820
|
self.DALDatabase.commit()
|
821
821
|
return self.write(
|
822
|
-
str(HTML(HEAD(), BODY(SCRIPT("window.location = '{0}'".format(redirect))))))
|
822
|
+
str(HTML(HEAD(), BODY(SCRIPT("setTimeout(function(){window.location = '{0}';}, 10)".format(redirect))))))
|
823
823
|
|
824
824
|
|
825
825
|
message = "An error occurred while trying to authenticate."
|
@@ -107,6 +107,18 @@ class PhanterPWA():
|
|
107
107
|
|
108
108
|
window.onerror = self.onGlobalError
|
109
109
|
|
110
|
+
def _location_redirect_timeout(self, redirect, timeout=10, callback=None):
|
111
|
+
|
112
|
+
def _location(url):
|
113
|
+
window.location = url
|
114
|
+
if callable(callback):
|
115
|
+
callback()
|
116
|
+
|
117
|
+
setTimeout(
|
118
|
+
lambda: _location(redirect),
|
119
|
+
timeout
|
120
|
+
)
|
121
|
+
|
110
122
|
def _clear_cache(self, names):
|
111
123
|
for x in names:
|
112
124
|
if x != self.versioning:
|
@@ -198,7 +210,9 @@ class PhanterPWA():
|
|
198
210
|
localStorage.removeItem("auth_user")
|
199
211
|
window.PhanterPWA.set_last_auth_user(auth_user)
|
200
212
|
if redirect is not None and redirect is not js_undefined:
|
201
|
-
|
213
|
+
self._location_redirect_timeout(
|
214
|
+
redirect
|
215
|
+
)
|
202
216
|
if way is not None and way is not js_undefined:
|
203
217
|
self.open_way(way)
|
204
218
|
|
@@ -557,9 +571,12 @@ class PhanterPWA():
|
|
557
571
|
def _after_get_social_login(self, data, ajax_status, callback=None):
|
558
572
|
json = data.responseJSON
|
559
573
|
if ajax_status == "success":
|
560
|
-
|
561
|
-
|
562
|
-
|
574
|
+
def callback_social_login():
|
575
|
+
return callback(data, ajax_status)
|
576
|
+
self._location_redirect_timeout(
|
577
|
+
json.redirect,
|
578
|
+
callback=callback_social_login if callback is not None else None
|
579
|
+
)
|
563
580
|
|
564
581
|
def _after_submit_register(self, data, ajax_status, callback=None):
|
565
582
|
json = data.responseJSON
|
@@ -1,4 +1,4 @@
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
1
|
+
phanterpwa/__init__.py,sha256=d3PRiPTYif9evc4T7_7qftzq86q1plB_ofHKx9koLvc,396
|
2
2
|
phanterpwa/__main__.py,sha256=1vSHtv6-sgAgpZiklf9bwarXX1b-fmKx1rjwJw4h78o,4017
|
3
3
|
phanterpwa/compiler.py,sha256=Je3qtVO_cZ69_PPWcXKyBgnRfQ-Ev-zkZ3UTN-ddOTQ,47478
|
4
4
|
phanterpwa/configer.py,sha256=PFO_nVy9r6yt5iDso1amDIR0Ge2UYYK3h-ae9M0Ezyk,26359
|
@@ -28,7 +28,7 @@ phanterpwa/backend/request_handlers/credentials.py,sha256=Gs6Rje80A8PaPqYpB39dMl
|
|
28
28
|
phanterpwa/backend/request_handlers/errors.py,sha256=x3SMdpkO4mxaSRZZQQxtH1zUFh47C06kssfI4CoPokc,4472
|
29
29
|
phanterpwa/backend/request_handlers/i18n_server.py,sha256=p3LQxOdcLHIjgaFs4wO1V2_7gKpfcDT7pDPa7m0-UbQ,3205
|
30
30
|
phanterpwa/backend/request_handlers/internal_messages.py,sha256=w_u3NYw0KZfuCIS8tHJhV12tj_UA0_aBekk22nR3oCc,17382
|
31
|
-
phanterpwa/backend/request_handlers/oauth.py,sha256=
|
31
|
+
phanterpwa/backend/request_handlers/oauth.py,sha256=NVlwaGlXsWdh4KOZ9hEpiA8qn7qNtw1hk0T_1uWtDwc,46101
|
32
32
|
phanterpwa/backend/request_handlers/websocket.py,sha256=KgS9RCsMlTmvFWG8kaLrsL3sv2O3rS4yn63FbNtr0tg,5716
|
33
33
|
phanterpwa/backend/request_handlers/welcome.py,sha256=w_h7UccR9g1-Dfy7AVqc74FLQzrgBjbY5rDhgAMUHno,723
|
34
34
|
phanterpwa/captchasvg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -83,7 +83,7 @@ phanterpwa/components/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60Nr
|
|
83
83
|
phanterpwa/components/preloaders/squares.py,sha256=TaReDPQZV8ntlODAg6Y5xSQVTe7DTE6HZvmtDMujV24,828
|
84
84
|
phanterpwa/components/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
|
85
85
|
phanterpwa/frontend/__init__.py,sha256=KjlnaINX8_d_4AFmWE_ZRzG8_rcxJXqUcf-FVy3fv_E,142
|
86
|
-
phanterpwa/frontend/application.py,sha256=
|
86
|
+
phanterpwa/frontend/application.py,sha256=tBV-rZzaeQVxPhbAqigf1aQE_R-drHKTeBt-QrXKNMc,57715
|
87
87
|
phanterpwa/frontend/decorators.py,sha256=Qrwqnk8-4N5xZCpDrcya6H1b5yFEHhUMOWT3H63p4KQ,4042
|
88
88
|
phanterpwa/frontend/fmasks.py,sha256=SgjJUlwFP927GYNeVaGPeZuH8p8KN8ipQzn-DKZd-6w,42522
|
89
89
|
phanterpwa/frontend/forms.py,sha256=_NCS6GWsyDU7d4DW3P1joz5LkT9SfPtCDCxAfCFoq2o,42785
|
@@ -435,10 +435,10 @@ phanterpwa/usual_sass/preloaders/indefined_text.sass,sha256=z4JuUtBrzoqH3HuNFXvN
|
|
435
435
|
phanterpwa/usual_sass/preloaders/run_points.sass,sha256=EYl93ljfgAc-ZLJ0VScrCoIlHP7Nr6NLdxj1zk2wm_E,3367
|
436
436
|
phanterpwa/usual_sass/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60NrtgRWBk_1oMt2_58,1348
|
437
437
|
phanterpwa/usual_sass/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
|
438
|
-
phanterpwa-14.1.
|
439
|
-
phanterpwa-14.1.
|
440
|
-
phanterpwa-14.1.
|
441
|
-
phanterpwa-14.1.
|
442
|
-
phanterpwa-14.1.
|
443
|
-
phanterpwa-14.1.
|
444
|
-
phanterpwa-14.1.
|
438
|
+
phanterpwa-14.1.3.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
439
|
+
phanterpwa-14.1.3.dist-info/METADATA,sha256=KoDGePAKbm-zWu2wefpXz9zqdIDH01R5togATZoFr-I,1938
|
440
|
+
phanterpwa-14.1.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
441
|
+
phanterpwa-14.1.3.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
442
|
+
phanterpwa-14.1.3.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
443
|
+
phanterpwa-14.1.3.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
444
|
+
phanterpwa-14.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|